I read as below
Static members of class are used for storing the values that are the same
for all instances of class.
In the below statement
out is a static member variable of the System class right. How are we able to call println method on satatic member variable of a system class.
Instance variables are alive till instance of the object xyz exists in the memory, that is the reason they are also called instance variables. Instance variablesshared and reused by all methods of the class, and even visible from externall classes also.
Static variables are alive after the instance object deleted(garbage collected) in the memory???. How instance variable life is different from static variable in this aspect.??
I am bit confused about static and instance variable which one to use in chich scenario and advantages, disadvantages, practical uses of each one.
Any links resources ideas highly appreciated. Thanks in advance