Questions et réponses d'entretien les plus demandées et tests en ligne
Plateforme d'apprentissage pour la preparation aux entretiens, les tests en ligne, les tutoriels et la pratique en direct

Developpez vos competences grace a des parcours cibles, des tests blancs et un contenu pret pour l'entretien.

WithoutBook rassemble des questions d'entretien par sujet, des tests pratiques en ligne, des tutoriels et des guides de comparaison dans un espace d'apprentissage reactif.

Preparation a l'entretien

Java Garbage Collection Questions et reponses d'entretien

Question 6. Explain the difference between 'gc()' and 'System.gc()' in Java.

'gc()' is a hint to the garbage collector to run, while 'System.gc()' is a method that suggests to the JVM to run the garbage collector, but the actual execution is at the discretion of the JVM.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 7. What is the PermGen space, and is it still used in Java 8 and later?

PermGen (Permanent Generation) space was used to store metadata related to classes. In Java 8 and later, PermGen space is replaced by Metaspace, which is more flexible and avoids memory leaks related to class metadata.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 8. Explain the concept of Generational Garbage Collection.

Generational Garbage Collection is based on the observation that most objects become unreachable shortly after they are created. It divides the heap into two main areas: the Young Generation and the Old Generation.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 9. What is the purpose of the 'finalize()' method in Java?

The 'finalize()' method is called by the garbage collector before an object is reclaimed. It allows an object to perform cleanup operations before being garbage collected.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 10. Explain the concept of garbage collection tuning in Java.

Garbage collection tuning involves configuring the garbage collector to meet specific performance goals. It includes selecting the appropriate garbage collector algorithm and adjusting related parameters.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Les plus utiles selon les utilisateurs :

Copyright © 2026, WithoutBook.