Monday, December 24, 2007

Static Members: Invocation Criteria.

public class Test {
public static void method(){ System.out.println("Called"); }
public static void main(String[] args) {
Test t4 = null;

what will be output of this?
No NullPointer Exception : Static methods and variables use class reference to get invoked.
(not the object even it is initialized) (parsing time search)

1 comment:

Mazhar said...

What are the other ways?