|
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.2) By 10587 users |
Added on |
10/13/2009 |
Views |
74851 |
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's the difference between == and equals method?
|
View Answer
|
|
What are abstract classes, abstract methods?
|
View Answer
|
|
How can you force all derived classes to implement a method present in the base class?
|
View Answer
|
|
What is the difference between an Applet and an Application?
|
View Answer
|
|
Java says "write once, run anywhere". What are some ways this isn't quite true?
|
View Answer
|
|
Describe java's security model.
|
View Answer
|
|
What is the difference between a Vector and an Array. Discuss the advantages and disadvantages of both?
|
View Answer
|
|
How many different types of JDBC drivers are present? Discuss them.
|
View Answer
|
|
What does the keyword "synchronize" mean in java. When do you use it? What are the disadvantages of synchronization?
|
View Answer
|
|
What are native methods? How do you use them?
|
View Answer
|
|
What is RMI?
|
View Answer
|
|
What is JDBC? Describe the steps needed to execute a SQL query using JDBC.
|
View Answer
|
|
Access specifiers: "public", "protected", "private", nothing?
|
View Answer
|
|
What does the "final" keyword mean in front of a variable? A method? A class?
|
View Answer
|
|
Does Java have "goto"?
|
View Answer
|
|
Why "bytecode"? Can you reverse-engineer the code from bytecode?
|
View Answer
|
|
What synchronization constructs does Java provide? How do they work?
|
View Answer
|
|
Are constructors inherited?Can a subclass call the parent's class constructor?When?
|
View Answer
|
|
Does Java have destructors?
|
View Answer
|
|
What does the "abstract" keyword mean in front of a method? A class?
|
View Answer
|