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 1. What is Garbage Collection in Java?

Garbage Collection is the automatic process of reclaiming the runtime unused memory by destroying the objects that are no longer reachable or referenced by the program.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 2. Explain the purpose of the finalize() method.

The finalize() method is called by the garbage collector before reclaiming the memory occupied by an object. It can be overridden to perform cleanup operations before an object is garbage collected.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 3. What is the role of the JVM (Java Virtual Machine) in garbage collection?

The JVM is responsible for managing the memory, including garbage collection. It runs the garbage collector to identify and reclaim unused memory.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 4. Name the different types of garbage collectors in Java.

The types of garbage collectors in Java include Serial Garbage Collector, Parallel Garbage Collector, CMS (Concurrent Mark-Sweep) Garbage Collector, and G1 (Garbage-First) Garbage Collector.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Question 5. What is the purpose of the Young Generation in the Java heap?

The Young Generation is the part of the heap where new objects are created. It is designed for short-lived objects, and garbage collection occurs more frequently in this generation.

Est-ce utile ? Ajouter un commentaire Voir les commentaires
 

Les plus utiles selon les utilisateurs :

Copyright © 2026, WithoutBook.