Yes, Java allows constructors to be declared as private. A private constructor prevents objects of the class from being created outside the class itself. This technique is commonly used to control object creation and enforce specific design patterns.
The Singleton pattern uses a private constructor to ensure that only one object of the class can be created and shared throughout the application.
public class Singleton {
private static Singleton instance = new Singleton();
private Singleton() {
System.out.println("Singleton Object Created");
}
public static Singleton getInstance() {
return instance;
}
public static void main(String[] args) {
Singleton obj1 = Singleton.getInstance();
Singleton obj2 = Singleton.getInstance();
System.out.println(obj1 == obj2);
}
}Singleton Object Created
true
public class MathUtil {
private MathUtil() {
}
public static int add(int a, int b) {
return a + b;
}
}In this example, no object of MathUtil can be created because all functionality is provided through static methods.
A concise interview answer is
Yes, a constructor can be private in Java. A private constructor prevents object creation from outside the class and is commonly used in Singleton classes, utility classes, and factory-based object creation patterns where controlled instantiation is required.
Last updated: 11 November 2026
Previous question: What is a constructor in Java?
Next question: Can a constructor be overloaded in Java?