多选题
Concerning Java"s Garbage Collector (GC), which are true? (Choose all that apply.)
A、
If Object X has a reference to Object Y, then Object Y cannot be GCed.
B、
A Java program can request that the GC runs, but such a request does NOT guarantee that the GC will actually run.
C、
If the GC decides to delete an object, and if finalize() has never been invoked for that object, it is guaranteed that the GC will invoke finalize() for that object before the object is deleted.
D、
Once the GC invokes finalize() on an object, it is guaranteed that the GC will delete that object once finalize() has completed.
E、
When the GC runs, it decides whether to remove objects from the heap, the stack, or both.
【正确答案】
B、C
【答案解析】
提交答案
关闭