/* Author : Michael Robinson Program : theObjectDataType.java Purpose : To show the Object data type passing multi data type variables to a method that accepts and displays them as Object data types and uses the Variable Length List and enhanced for loop to process them Updated : December 23, 2099 */ public class theObjectDataType { //****************** Object special data type ****************** //The Object data type (notice Object with capital O), accepts * //all data data types such as int, float, double, String, etc. * //This method accepts unknown amount of Objects * //*************************************************************** public static void passingObjects( Object ... args ) { System.out.println( " You have passed in " + args.length + " arguments " ); for( Object o : args ) { System.out.println( " " + o ); } }//end public static void passingObjects(Object ... args) public static void main( String arg[] ) { //calling method passingObjects passing 4 multi data types items passingObjects( "one", 1, 2.30, "last" ); //calling method passingObjects passing 5 multi data types items passingObjects( "hello", 0.23, -2, "bye", 77 ); //calling method passingObjects passing 6 multi data types items passingObjects( 99, "one", 6.3210, "nice", 123, -0 ); }//end public static void main( String arg[] ) }//end public class theObjectDataType