/* Author : Michael Robinson Program : the_toStringCaller.java Purpose : Here we learn to use the Java toString method toString is very easy to implement and very useful Updated : August 18, 2099 */ public class the_toStringCaller { public static void main( String arg[] ) { //We create a class called theToStringExternalClass //in it we have a method called toString() to be used by this //program in several ways: //first creating an object of class theToStringExternalClass //this class is our own external class theToStringExternalClass toStringObj = new theToStringExternalClass( 8, 3, 2099 ); //or System.out.println( "I am using the object's toString" + " method : " + toStringObj ); //or System.out.println( "I am using the object's toString" + " method : " + toStringObj.toString() ); }//end public static void main( String arg[] ) }//end public class the_toStringObject