Discussion :: Objects and Collections
-
What will be the output of the program?
public class Test { public static void main (String args[]) { String str = NULL; System.out.println(str); } }
Answer : Option B
Explanation :
Option B is correct because to set the value of a String variable to null you must use "null" and not "NULL".
Be The First To Comment