This code snippet:
public class NumberFormatException extends IllegalArgumentException {
public NumberFormatException (String test) {
super (test);
}
static NumberFormatException forInputString(String test) {
return new NumberFormatException("Caused By: \"" + test + "\"");
}
}
throws NullPointerException:
java.lang.NullPointerException
at java.lang.NumberFormatException.forInputString(NumberFormatException.java)
I'm unable to ascertain what value of 'test' can be the root cause of a NullPointerException since in the concatenation, null is printed on the screen if the value of a String is null.