[HD Pg 29, Sec. 2.1.3 - scope-and-lifespan]

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Username987654
Posts: 95
Joined: Sat Dec 26, 2015 6:37 pm
Contact:

[HD Pg 29, Sec. 2.1.3 - scope-and-lifespan]

Post by Username987654 »

t.data is accessible therefore, it will compile fine even though the object referred to by t has already ceased to exist
It cannot be guaranteed that "the object referred to by t has already ceased to exist". It can only be guaranteed that the object does not have a reference. Correct?

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: [HD Pg 29, Sec. 2.1.3 - scope-and-lifespan]

Post by admin »

Yes, the programmer can only ensure that there are no references to an object. But from the perspective of the topic of this discussion, i.e. from the perspective of the lifespan scope, the object practically does not exist.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests