Billy Tsai wrote:so if a object that represents some data structure is created within a static method as a local variable then after the method finishes the space that object occupies should be cleared(i.e. available again) and that object is destroyed?
naveen yadav wrote:
what about the object created inside a method shouldn't it be stored on stack ?
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
Ikpefua Jacob-Obinyan wrote:
........... objects are referenced from outside the method where they where created "
naveen yadav wrote:
Ikpefua Jacob-Obinyan wrote:
........... objects are referenced from outside the method where they where created "
suppose i have a code in which object do not referenced from outside.It is created inside the method and used inside the method.No reference to the outside
at a look
and yes i can access the nav directly but for the sake of explanation of my point using ob to i access nav .
should not it be ob stored on stack ?
OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.