⭐Non-Static Members


Home SQL Manual Testing Java Selenium

Defination:-
dot imgAny Member's of the class Which is Not Declared with the keyword Static is called Non-Static member's of the class.
dot imgNon-Static is always associated with Object.
dot imgNon-Static is multiple copies.
dot imgAll the Non-Static member's are stored in Heap Memory.
dot imgWhenever 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

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

dot_imgSanjay 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.


 real_time_exam