Attribute / Data / Properties / Field
Method / Behaviour
There are several kinds of variables in a Java class:
Member variables in a class—these are called instance/non-static attribute.
Member variables with static modifier in a class—these are called static attribute or class variable.
Variables in a method or any block of code—these are called local variables.
Methods in class can be:
Member methods in a class—these are called instance/non-static methods.
Member methods with static modifier in a class—these are called static methods or class methods.
Point to remebber
In a class, variables and methods can be static or non-static.
By-default, all members are non-static.
To declare a member as static use modifier static.
Non-static members (variables and methods) are called instance members.
Static members (variables and methods) are called class members.
Local variable can't be static.
Training For College Campus
We offers college campus training for all streams like CS, IT, ECE, Mechanical, Civil etc. on different technologies
C, C++, Data Structure, Core Java, Advance Java, Struts Framework, Hibernate, Python, Android, Big-Data, Ebedded & Robotics etc.
Please mail your requirement at email@example.com
Projects For Students
Students can contact us for their projects on different technologies Core Java, Advance Java, Android etc.
Students can mail requirement at firstname.lastname@example.org