KnowledgeBoat Logo

Computer Applications

Differentiate between static data members and non-static data members.

Java Classes

ICSE 2010

89 Likes

Answer

Static Data MembersNon-Static Data Members
They are declared using keyword 'static'.They are declared without using keyword 'static'.
All objects of a class share the same copy of Static data members.Each object of the class gets its own copy of Non-Static data members.
They can be accessed using the class name or object.They can be accessed only through an object of the class.

Answered By

47 Likes


Related Questions