Question d’entretien chez Pranjal (India)

Define Singleton Classes in Java.

Réponse à la question d'entretien

Utilisateur anonyme

4 août 2022

When we make the constructor of a class private, that particular class can generate only one object. This type of class is popularly known as a Singleton Class.