Defination:-
Any Member's of the class Which is Not Declared with the keyword Static is called Non-Static member's of the class.
Non-Static is always associated with Object.
Non-Static is multiple copies.
All the Non-Static member's are stored in Heap Memory.
Whenever we want to access Non-Static member's from one class to another class we should use
1.object.variable_name
or
2.object.method_name();
or
3.reference_variable.variable
or
4.reference_variable.method_name();
⭐OBJECT CREATION
Operator:It will create random memory space into the Heap Memory.
Constructor:-It will initialize all the non-static member's into Heap Memory
Real Time Example of Non-Static
Sanjay and Geeta joined Qspider and they started with Java, in the first mock Sanjau got mock Rating 2 and geeta got mock rating 1.Sanju was fyrstrated and he met his friend, his friend gave a beautiful idea i.e study hard whole night and take remock.Next day Sanjay took remock and got mock rating 1.
=>WAP to display Sanjay and Geeta's mock rating.