Pranjal (India) Interview Question

Define Singleton Classes in Java.

Interview Answer

Anonymous

Aug 4, 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.