Objects and Collections - Programming

Q1:

What will be the output of the program?
public class Test 
{ 
    public static void main (String args[]) 
    {
        String str = NULL; 
        System.out.println(str); 
    } 
}

A NULL

B Compile Error

C Code runs but no output

D Runtime Exception

ANS:A - NULL

Option B is correct because to set the value of a String variable to null you must use "null" and not "NULL".