What does it mean that a method or field is “static”? November 28, 2006
Posted by Allu in JAVA.trackback
Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all instances of that class.
Static methods can be referenced with the name of the class rather than the name of a particular object of the class.
why do one need static methods ? can you give me some real time situations with the need for static methods and fields with brief examples.
Straight forward answer . good answer. And it is good answer by alla.
Thankx
pl explain me with example