String and NULL!!!
What is the expected output?
public static void main(String args []) {
String stmt = null;
System.out.print(null+stmt);
System.out.print(stmt+null);
}
Please choose only one answer:
public static void main(String args []) {
String stmt = null;
System.out.print(null+stmt);
System.out.print(stmt+null);
}
Please choose only one answer:
- RuntimeException is thrown because of the first print statement
- RuntimeException is thrown because of the second print statement
- nullnullnullnull
- nullnull
- compilation error
Post your doubt in the comment section below.
Comments
Post a Comment