|
INTERVIEW QUESTIONS
J2EE
JAVA
DETAILS
Question: How does garbage collection work
Answer: There are several basic strategies for garbage collection: reference counting, mark-sweep, mark-compact, and copying. In addition, some algorithms can do their job incrementally (the entire heap need not be collected at once, resulting in shorter collection pauses), and some can run while the user program runs (concurrent collectors). Others must perform an entire collection at once while the user program is suspended (so-called stop-the-world collectors). Finally, there are hybrid collectors, such as the generational collector employed by the 1.2 and later JDKs, which use different collection algorithms on different areas of the heap
|
|
|
Category |
Java Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 7537 users |
Added on |
7/17/2011 |
Views |
71808 |
Rate it! |
|
|
Question:
How does garbage collection work
Answer:
There are several basic strategies for garbage collection: reference counting, mark-sweep, mark-compact, and copying. In addition, some algorithms can do their job incrementally (the entire heap need not be collected at once, resulting in shorter collection pauses), and some can run while the user program runs (concurrent collectors). Others must perform an entire collection at once while the user program is suspended (so-called stop-the-world collectors). Finally, there are hybrid collectors, such as the generational collector employed by the 1.2 and later JDKs, which use different collection algorithms on different areas of the heap 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 |
|
Explain the keywords - native, transient, volatile, finally
|
View Answer
|
|
Differences between HashList and HashMap, Set and List
|
View Answer
|
|
What are the differences between C++ and Java
|
View Answer
|
|
How can you do multiple inheritance in Java
|
View Answer
|
|
What is data encapsulation? What does it buy you
|
View Answer
|
|
Would you like to derive data from a base class
|
View Answer
|
|
Is there a separate stack for each thread in Java
|
View Answer
|
|
What is heap in Java
|
View Answer
|
|
What design patterns have you used
|
View Answer
|
|
JVM is platform independent/dependent?why?
2) which one is faster in execution Array List or Array? why?
|
View Answer
|
|
How an Hashtable can change the iterator? Can a HashMap change the iterator?
|
View Answer
|
|
How an Hashtable can change the iterator? Can a HashMap change the iterator?
|
View Answer
|
|
What is MVC architecture
|
View Answer
|
|
What are the differences between ArrayList and a Vector
|
View Answer
|
|
What would happen if you say this = null
|
View Answer
|
|
How are memory leaks possible in Java
|
View Answer
|
|
How does serialization work
|
View Answer
|
|
How would you keep track of a session
|
View Answer
|
|
How can we take various inputs from user as int,char,string,float etc ?
|
View Answer
|
|
Why multiple inheritance using classes is disadvantage in java
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Java Interview Questions & Answers - Exam Mode /
Learning Mode
|