What is garbage collection in Java, and how can it be used ?
Answer Posted / sivadasan
Garbage collection is a thread, that runs to reclaim the
memory by destroying objects which object is cannot be
referenced anymore.
Deleting Dynamically created objects from the memory.
Finalize method used to achieve garbage collection.
By using Runtime.gc() or System.gc() the object will be
garbage collected.
| Is This Answer Correct ? | 30 Yes | 16 No |
Post New Answer View All Answers
Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.
What are triggers in DB? Explain their types. How do they work?
Can we return null in java?
Difference between overriding and overloading in java?
Explain static nested classes ?
How do you define a parameter?
What is nullpointerexception?
What is the primary benefit of encapsulation?
What is the byte order of byte buffer?
What does || || mean in math?
State one difference between a template class and class template.
What are the ways in which a thread can enter the waiting state?
What is the purpose of assert keyword used in jdk1.4.x?
What is an exception in java?
Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).