Код: Выделить всё
public class Foo {
public static void main(String[] args) {
x(generics());
}
public static T generics() {
return null;
}
public static void x(Object o) {
System.out.println("Method with Object");
}
public static void x(char[] c) {
System.out.println("Method with char[]");
}
}
Мне просто было любопытно, почему это изменилось.
Подробнее здесь: https://stackoverflow.com/questions/795 ... g-generics