Question: Which of the following statements is true? Select the one correct answer. (a) Objects can be explicitly destroyed using the keyword delete. (b) An object

Which of the following statements is true?

Select the one correct answer.

(a) Objects can be explicitly destroyed using the keyword delete.

(b) An object will be garbage collected immediately after it becomes unreachable.

(c) If object obj1 is accessible from object obj2, and object obj2 is accessible from obj1, then obj1 and obj2 are not eligible for garbage collection.

(d) Once an object has become eligible for garbage collection, it will remain eligible until it is destroyed.

(e) If object obj1 can access object obj2 that is eligible for garbage collection, then obj1 is also eligible for garbage collection.

Step by Step Solution

3.40 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

e An object is eligible for garbage collection only if all remaining references to the ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!