//==================================================================================================
// To allow a method to accept a parameter of any type, 
// ... use <anySymbol> (example <T> or <E> or <generic> ) before the method return type
// In this case the method takes an array of any type T
// All generic types are internally converted by the compiler to Object type 
// Within a generic method, you can also create a generic variable
//==================================================================================================
public class genericMethod
{                                                                        
    public static void main(String args[])                       
    {
        Integer x = 1234;                   //create variables of different data types
        Double  y = 123.45;     
        String  z = "Hello World";           

        print(x);                                       //pass an Integer to the method
        print(y);                                       //pass a Double to the method
        print(z);                                       //pass a String to the method
    }
    
    static <T> void print( T input )                    //a method that takes any data type
    {      
        T variable = input;                             //create a generic variable

        System.out.println(variable);
    }
}