What is garbage collection in Java, and how can it be used ?
Answer Posted / samji
When a Java object becomes unreachable to the program, then
it is subjected to garbage collection. The main use of
garbage collection is to identify and discard objects that
are no longer needed by a program so that their resources
can be reclaimed and reused.
| Is This Answer Correct ? | 4 Yes | 6 No |
Post New Answer View All Answers
What happens to a static var that is defined within a method of a class?
What is meant by class and object in java?
How can you set an applet’s height and width as a percentage?
What is the latest version of java?
Why unicode is important?
What is the difference between superclass and subclass?
List some oops concepts in java?
Is an array a vector?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
Difference between object and reference?
What is the difference between break and continue statements?
what is the constructor and how many types of constructors are used in java?
Where is const variable stored?
what is bmg file and how to create that files?what will it contailn?
Distinguish between a predicate and a function?