Java Private No-Arg Construtor
class Main {
int i;
// constructor with no parameter
private Main() {
i = 15;
System.out.println("Constructor called \n");
}
public static void main(String[] args) {
// calling the constructor without any parameter
Main obj = new Main();
System.out.println("Value of i: " + obj.i);
}
}
Outrageous Ostrich