Computer Science Canada

difference between statica and instance members

Author:  person [ Sat Feb 11, 2006 8:22 am ]
Post subject:  difference between statica and instance members

wat r the differences between these 2, and how are they used differently, and in which scenarios should each one be used in?

Author:  Cervantes [ Sat Feb 11, 2006 10:13 am ]
Post subject: 

Static methods are associated with the class itself. One can call a static method without creating an object of the class. Non-static methods are associated with objects of that class, and can only be called by objects.

I suggest you take a look at wtd's An Introduction to Java, with particular attention to the second post


: