Hi!
public class Test011 extends Object
{
public static void main(
String args[])
{
Test011 t = new Test011();
System.out.print(null.equals(t)); //1
System.out.print(" ");
System.out.println(t.equals(null)); //2
}
}
The answer is:
B: The code compiles but at runtime throws
NullPointerException at line //1.
But I can not compile this code, the compiler throw Error(13) null cannot be dereferenced.
Whats happend??
Thank you in advance