| Author |
Instance/Class Variables/Methods
|
Steven Alvarez
Ranch Hand
Joined: Nov 01, 2006
Posts: 66
|
|
|
Can someone please give a CLEAR explanation on what is a Instance Variable, Instance Method, Class Variable, and Class Method? Thanks a lot!
|
 |
Maddukuri Sudheer
Greenhorn
Joined: Jan 09, 2007
Posts: 4
|
|
|
The Java programming language uses both "fields" and "variables" as part of its terminology. Instance variables (non-static fields) are unique to each instance of a class. Class variables (static fields) are fields declared with the static modifier; there is exactly one copy of a class variable, regardless of how many times the class has been instantiated. Local variables store temporary state inside a method. Parameters are variables that provide extra information to a method; both local variables and parameters are always classified as "variables" (not "fields").
|
Sudheer M
|
 |
 |
|
|
subject: Instance/Class Variables/Methods
|
|
|