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

What is the SimpleTimeZone class?

0 Answers  


What’s the difference between callable and runnable?

0 Answers  


What is the difference between abstract classes and interfaces?

0 Answers  


What class allows you to read objects directly from a stream?

0 Answers  


What is CardLayout?

1 Answers   Infosys,






What is general methodology?

0 Answers  


How to print an arraylist in java?

0 Answers  


Can a class have a static inner class?

0 Answers  


What type of variable is error flag?

0 Answers  


What is the most important feature of java? What is an interface?

0 Answers  


What is hard code & soft code?

7 Answers   Cognizant, Wipro,


What are internal variables?

0 Answers  


Categories