class ObjX { private int i; private String name; // This is the first constructor: only takes in one parameter for the name. public ObjX (String initialName) { name = initialName; i = 0; } // This is the second constructor: both name and ID are initialized. public ObjX (String initialName, int ID) { name = initialName; i = ID; } // No-parameter constructor that we added public ObjX () { name = "X"; // Default name i = 0; // Default value of i } public String toString () { return "My name is " + name + " and my ID number is " + i; } } public class DynamicExample15 { public static void main (String[] argv) { ObjX x = new ObjX (); x.i = 5; // Won't compile. // The right way: x = new ObjX ("", 5); System.out.println (x); } }