class A {
char doh(char c) {
System.out.println("doh(char)");
return 'd';
}
float doh(float f) {
System.out.println("doh(float)");
return 1.0f;
}
}
class B {}
class C extends A {
void doh(B m) {
System.out.println("doh(B)");
}
}
public class MainClass {
public static void main(String[] args) {
C b = new C();
b.doh(1);
b.doh('x');
b.doh(1.0f);
b.doh(new B());
}
}
|