What is garbage collection in Java, and how can it be used ?
Answer Posted / pranab dutta
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 ? | 322 Yes | 35 No |
Post New Answer View All Answers
What type of language is java?
How does regex work?
What is thread life cycle in java?
Does java set allow duplicates?
Can we override data members in java?
What is natural ordering in java?
What do you mean by chromounits in java8?
Is it possible for yielded thread to get chance for its execution again ?
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
What is bool mean?
How do you classify Dialog Box?
What is sizeof () operator?
What is the function of compareto in java?
What is the static variable?