Results 1 to 2 of 2
- 06-14-2010, 04:43 PM #1Member
- Join Date
- Jun 2010
- Rep Power
- 06-14-2010, 04:47 PM #2
what.... Depends on how many static methods your create....
Static methods use no instance variables of any object of the class they are defined in. If you define a method to be static, you will be given a rude message by the compiler if you try to access any instance variables. You can access static variables, but except for constants, this is unusual. Static methods typically take all they data from parameters and compute something from those parameters, with no reference to variables. This is typical of methods which do some kind of generic calculation. A good example of this are the many utility methods in the predefined Math class. (See Math and java.util.Random).
http://leepoint.net/JavaBasics/metho...20-define.html:rolleyes: ~ Sno ~ :rolleyes:
'-~ B.S. Computer Science ~-'