What is garbage collection in Java, and how can it be used ?

Answer Posted / ravi

when there are no refrences to an object,means that it is
not in use anymore.so the JVM marks it for garbage
collection ,which is basically a process of taking back the
resources from the object which was given to it earlier.

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is better - 'bit-shift a value' or 'multiply by 2'?

674


Does string isempty check for null?

541


Can you call one constructor from another if a class has multiple constructors?

564


What does regex mean?

538


What is the order of arraylist in java?

586






How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?

518


Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.

2350


How to do a true java ping from windows?

592


Describe how to implement singleton design pattern in struts.

504


What is namespace in java?

520


What are the types of sockets in java?

514


What is a control variable example?

509


What is the implementation of destroy method in java. Is it native or java code?

452


What is the relationship between class and object?

504


What is blank final variable?

547