What is garbage collection in Java, and how can it be used ?
Answer Posted / rana.ankur
Garbage collection is a method of jvm.In JAVA when object
iis not use in otherway there is no refrence to that object
it is ellegible for Garbage collection.
demon thread is used and its is known as Garbage
collectior..
and finalize method are also invoke to give last chance to
object to save it imprtant data..thanking you
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain about fail safe iterators in java?
What do you mean by jjs in java8?
What is difference between arraylist and list in java?
How do you clear an arraylist in java?
State the merge-sort principle and its time complexity.
what is the difference between a threads start() and run() methods? : Java thread
Why is string class considered immutable?
Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.
What is the difference between static and global variables and also define what are volatile variables?
What are the advantages and disadvantages of object cloning?
What is public static?
In which order the iterator iterates over collection?
Name some classes present in java.util.regex package.
Which access specifier can be used with class ?
Why do we need singleton class?