Question PRG-JAVA-0069
HardWhat is the output of this program?
public class Main {
public static void main(String[] args) {
String s = null;
System.out.println("value: " + s + " " + (s instanceof String));
}
}
- A.
NullPointerException
- B.
value: null true
- C.
Sign up free to see the answer and a step-by-step explanation.