It is also called the unchecked exception as it escapes during compile-time but is thrown during runtime. lang. . . You need to throw exceptions effectively. Hence there is no compulsion for the programmer to. e java. . . When obj or its canonical name (name) is null, however, m is expected to return the default value (valueIfNull). Aug 12, 2020 Firstly, a detailed message computation is only done when the JVM itself throws a NullPointerException the computation won&39;t be performed if we explicitly throw the exception in our Java code. . . an exception.