param
method will be called from the autoboxing
method? If one param
method is commented out then it will have no problem calling the other.private static void autoboxing() {
Integer integer = new Integer(2);
param(integer);
}
private static void param(int param) {
System.out.println("param(int " + param + ")");
}
private static void param(Object param) {
System.out.println("param(Object " + param + ")");
}
No comments:
Post a Comment