class ObjX { int i; 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; } public String toString () { return "My name is " + name + " and my ID number is " + i; } } public class DynamicExample13 { public static void main (String[] argv) { // Use the first constructor. ObjX x = new ObjX ("Mr. X"); System.out.println (x); // Use the second one. x = new ObjX ("Mr. X", 5); System.out.println (x); } }