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

Answer Posted / jaffer

Actually garbage collector is a daemon thread. Normally
JVM’s heap stores all objects which is created by new
operator. So objects are occupying memory in heap. Some
objects are not used for long time. So garbage collector do
that work automatically.
Otherwise we call finalization method

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com

1083


Does java trim remove newline?

549


Why java applets are more useful for intranets as compared to internet?

587


How do you make an arraylist empty in java?

485


When a thread is executing a synchronized method , then is it possible for the same thread to access other synchronized methods of an object ?

619






What classes of exceptions may be caught by a catch clause in java programming?

709


Can a constructor be protected?

542


What is the maximum size of arraylist in java?

503


Why do we need wrapper class?

541


What does %d do in java?

586


Can list contain null in java?

638


What do you mean by append?

542


Give me an example of array and linked list? Where they can be used?

561


What is the difference between multitasking and multithreading in Java

730


When is the finalize() called?

711