public class Test2 {
public static void main(String[] args) {
f(5);
f('a');
f("a");
f(2.5);
}
public static void f(Integer a){
System.out.println(a.getClass());
}
public static void f(Character a){
System.out.println(a.getClass());
}
public static void f(String a){
System.out.println(a.getClass());
}
public static void f(Double a){
System.out.println(a.getClass());
}
} |