You are on page 1of 1

Types of Lifetime Diff ways of Alias Default Modification java 10v new

Purpose Scope Modifiers


Variable Creation Destroy accessing Name value effect feature

Allocating one When its From all 4 ways-


Class Modification is
copy of memory When its enclosing methods of its (1):Directly,(2):by private, default,
Variable effected to all
to store value enclosing calss is current class & Using class protect, public,
Static Variable ,Field, Applicable objects and all Not Applicable
comman to all class is unloaded also from other name,(3):by using static, final,
Property,Att methods because
objects and loaded (or) JVM classes only if it object,(4):by using transient, volatile
ribute one copy memory
methods Shutdown is not private Null Ref. varaibe.

Allocating
multiple copies of
memories From all
only one way- (1): Instance
separtely for When its methods of its private, default, Effected to all
when its by using object ,By variable,
every object its enclosing current class & protect, public, methods but not
Non-static object is Directly/Class Field, Applicable Not Applicable
instance to store class object from other static, final, effected to other
destroyed Name:CE, By Null Property
a value specific to is created classes method transient, volatile objects
Ref.varibale:RE ,Attribute
this objet by using object
comman to all
method
Receving and
storing input when its
when its Auto
values either for enclosing Only within its
method directly by its name, Variable , Not Not effected to
Parameter storing in SV/NSV method is enclosing only final Not Applicable
execution is CN/obj/NRV-CE Stack Applicabel other methods
or for executing called method
completed Variable
blogic of this /invoked
method
When its
when its enclosing
enclosing block Only within its
Auto
Storing a value method is execution enclosing block
directly by its name, Variable , Not Not effected to
Local-Variable Specific one invoked & its completed (or) within its only final Applicable
CN/obj/NRV-CE Stack Applicabel other methods
method declartion (or) its enclosing
Variable
statement is method method
executed execution
completed

You might also like