How GC (Garbage Collector) knows the objects reference is
unused.Whether GC removes the unused object Parmanently or
it maintains something.

Answers were Sorted based on User's Feedback



How GC (Garbage Collector) knows the objects reference is unused.Whether GC removes the unused obje..

Answer / devarathnam.c, kotagudibanda,k

Hi,
The Garbage Collector(GC)will be always under the control
of JVM, So JVM periodically runs the GC. It uses "sweep"
and "mark" algorithms to identify the unused objects in the
application. You don't bother about GC, JVM will take of it.

Is This Answer Correct ?    9 Yes 0 No

How GC (Garbage Collector) knows the objects reference is unused.Whether GC removes the unused obje..

Answer / balamurugan

it checks whenever we will not used the objects in our
program then jvm checked with forward referenceduse help of
heap memory. then gb removes the un used objects

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Core Java Interview Questions

int a=1; float b=1.0; System.out.println(a==b);

13 Answers   CTS, Honeywell, McAfee,


how are methods defined?

0 Answers  


If all the methods in abstract class are declared as abstract then what is difference between abstract class and in interface?

8 Answers   Infosys, Synechron,


What is use of map in java?

0 Answers  


What are parsing rules?

0 Answers  






what models are available for event handling?

1 Answers  


Describe the various concepts related to object oriented programming (oop).

0 Answers  


What is the difference between length and length() method in java?

0 Answers  


What are the differences between c++ and java?

0 Answers  


How do you invoke a method?

0 Answers  


What is HashTable?

4 Answers  


Explain the selection sort algorithm and state its time complexity?

0 Answers   Flextronics,


Categories