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

Answer Posted / janet

When an object is no longer referred to by any
variable,java automatically reclaims memory used by that
object.This is known as garbage collection.
System.gc() method may be used to call it explicitly.

Is This Answer Correct ?    180 Yes 34 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what do you understand by synchronization? : Java thread

544


What are scalar data types?

520


What is linked hashset and its features?

541


write a program that list all permutations of ABCDEF in which A appears before B?

2009


How do you square a number?

576






How can you make sure that your singleton class will always return single instance in multi-threaded environment?

565


What is the basic of java?

566


What is qualitative variable?

517


How to pass arraylist to stored procedure in java?

539


What is the relationship difference the canvas class and the graphics class?

560


What does the append?

491


What is ternary operator in java?

589


What is a final class in java?

539


What Is Query Throttling in java?

555


What is try-with-resources in java?

603