Class Members





In Java, a class can have the following components :
  • Attribute / Data / Properties / Field

  • Method / Behaviour

  • Constructor

  • Initializer Blocks


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.


prowessapps.in 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.

Next topic is constructors




 

Training For College Campus

We offers college campus training for all streams like CS, IT, ECE, Mechanical, Civil etc. on different technologies like
C, C++, Data Structure, Core Java, Advance Java, Struts Framework, Hibernate, Python, Android, Big-Data, Ebedded & Robotics etc.

Please mail your requirement at info@prowessapps.in


Projects For Students

Students can contact us for their projects on different technologies Core Java, Advance Java, Android etc.

Students can mail requirement at info@prowessapps.in



CONTACT DETAILS

info@prowessapps.in
(8AM to 10PM):

+91-9026070669 , +91-9451396824

© 2016, prowessapps.in, All rights reserved