import java.util.* ; class Employee1 { int id; } class Employee2 { int id; public Employee2() { System.out.println( "Employee2: Default Constructor" ) ; } } class Employee3 { int id; //public Employee3() //No default Employee3() constructed //by Java public Employee3(int idP) { id = idP ; //same as this.id = idP ; System.out.println( "Employee3: Default Constructor" ) ; } } class Employee4 { int id; public Employee4() { //Calling another constructor //must be the first call in the function this(1) ; System.out.println( "Employee4(): Default Constructor" ) ; } public Employee4(int idP) { id = idP ; System.out.println( "Employee4():Employee4(int idP) Constructor" ) ; } } public class Constructor1 { public static void main( String args[] ) { //Class does not have a constructor so java //creates a default no arg constructor that //does nothing. Employee1 employee1Object = new Employee1() ; //We create a default constructor and call it Employee2 employee2Object = new Employee2() ; //Can't do. //Java states that you have a constructor //that takes an argument . Why don't you use that. //Employee3 employee3Object = new Employee3() ; //Employee3 employee3Object = new Employee3(1) ; //An example of one constructor calling another Employee4 employee4Object = new Employee4() ; } //public static void main( String args[] ) }