static String value = "Are you expecting Null Pointer????";
Null getNull() {
return null; // attention attention !!!!!
}
public static void main(final String args[]) {
final Null Null = new Null();
System.out.println(Null.getNull().value);
}
}
Who can tell me the output of this program without executing????
Tricky One!!!!!!!!!
3 comments:
Hehe :)
I don't think it would run because the modifier for the method getNull() is not valid. And there are many more errors.
Hi Ebuka,
It’s in default modifier. Calling method (default modifier) with in a class is Legal. Nothing wrong in that. i can assure you that no compilation error. Now guess the output
Ps : u haven’t reached the heart of this program
Post a Comment