The "default" for constructors is that they do not have any arguments.The visibility of the default constructor is the same as the visibility of the class. Thus a class defined package- privately has a package-private default constructor
classParent {privateString name;privateint age;publicParent() { } // necessary because we call super() without argumentspublicParent(String tName,int tAge) { name = tName; age = tAge; }publicvoidprinter() {System.out.println("Name : "+this.name+" Age : "+this.age); }}// This does not even compile, because name and age are private,// making them invisible even to the child class.classChildextendsParent {publicChild() { super("uday2",10); }}classMain {publicstaticvoidmain(String[] args) {Parent p =newParent("uday",42);Child c =newChild();p.printer();c.printer(); }}