|
INTERVIEW QUESTIONS
J2EE
JAVA
DETAILS
Question: Describe, in general, how java's garbage collector works?
Answer: The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection. The Java runtime environment supports a garbage collector that periodically frees the memory used by objects that are no longer needed. The Java garbage collector is a mark-sweep garbage collector that scans Java's dynamic memory areas for objects, marking those that are referenced. After all possible paths to objects are investigated, those objects that are not marked (i.e. are not referenced) are known to be garbage and are collected.
|
|
|
Category |
Java Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7533 users |
Added on |
7/15/2011 |
Views |
67700 |
Rate it! |
|
|
Question:
Describe, in general, how java's garbage collector works?
Answer:
The Java runtime environment deletes objects when it determines that they are no longer being used. This process is known as garbage collection. The Java runtime environment supports a garbage collector that periodically frees the memory used by objects that are no longer needed. The Java garbage collector is a mark-sweep garbage collector that scans Java's dynamic memory areas for objects, marking those that are referenced. After all possible paths to objects are investigated, those objects that are not marked (i.e. are not referenced) are known to be garbage and are collected. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is the difference between StringBuffer and String class?
|
View Answer
|
|
How can you achieve Multiple Inheritance in Java?
|
View Answer
|
|
What are the main differences between Java and C++?
|
View Answer
|
|
In Java, You can create a String object as: String str = "abc"; & String str = new String("abc");Why
|
View Answer
|
|
How to make application thread-safe ?
|
View Answer
|
|
What is it object serialization ?
|
View Answer
|
|
What do you know about networking support in Java ?
|
View Answer
|
|
What you know about Corba implementation in Java ?
|
View Answer
|
|
What is Java Beans ?
|
View Answer
|
|
Compare SWING components to standard AWT.
|
View Answer
|
|
What is layout manager ? How does it work ?
|
View Answer
|
|
What are the advantages of OOPL?
|
View Answer
|
|
How many methods do u implement if implement the Serializable Interface?
|
View Answer
|
|
How do I instantiate a bean whose constructor accepts parameters using the useBean tag?
|
View Answer
|
|
Searching a String
|
View Answer
|
|
Connecting to a Database and Strings Handling
|
View Answer
|
|
What is the difference between Serializalble and Externalizable interface?
|
View Answer
|
|
What is the serialization?
|
View Answer
|
|
What are synchronized methods and synchronized statements?
|
View Answer
|
|
What is synchronization and why is it important?
|
View Answer
|