Constructor can use any access modifier even private also.If a constructor is declared private in a class then it will create only one object to its class ,that type of classes are called Singleton classes.
SingleTon class code :
private static SingleTon st =null;
System.out.println("n this is constructor");
public static SingleTon stfactory()