|
I am new to Java Technology. Can anyone explain me
the difference between class variable and instance variable, class methods
and instance methods, and also class members?
This are the basic terms, in which , we need to be strong with out any confusions. 1. class members : members declared in a class. Both data members (variables declared in a class) as well as member functions (methods declared as in a class). 2. class varibale : a data member which is declared with static modifier. 3. Instance variable : a data member in a class with out
static modifier.
4. Class method : a method with static modifier. 5. Instance methos : a method with out ststic modifier.
1. static method can use only static variables.
This is the minimum information, we need to know as a basic concept. Siva |
|
See also Do you have a Java Problem?Ask It in The Java Forum Java Books
Return to : Java Programming Hints and Tips All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|