I agree that without extending class B the output is "1233" but why if extending class B with A the code doesn't compile ?
public class SomeClass {
public static class A {
public void f(int x){
System.out.print("1");
}
public void f(Object x){
System.out.print("2");
}
}
public static class B // extends A {
public <T> void f(T x){
System.out.print("3");
}
}
public static void main( String[] args){
A a=new A();
B b=new B();
a.f(3);
a.f("hello");
b.f(3);
b.f("hello");
}
}