public class Overload {
    // Demonstrate method overloading
    // overload the whatAmI method to have a version
    // for integer, double, and character input

    public static void whatAmI( int i ) {
        System.out.println("I'm an integer! " + i );
    }

    public static void whatAmI( double d ) {
        System.out.println("I'm a double! " + d );
    }

    public static void whatAmI( char c ) {
        System.out.println("I'm a character! " + c );
    }

    // method main calls whatAmI with different input types

    public static void main(String[] args) {
        int myInt = 3;
        double myDouble = 3.14159;
        char myChar = 'X';
        whatAmI( myInt );
        whatAmI( myDouble );
        whatAmI( myChar );
    }
}
