hi... take a look at this code.
interface I5 {
final int i = 5;
public void help();
}
interface I6 {
public int help();
}
class D {
D () {
System.out.println("This is D");
}
public void printThis () {
System.out.println("superclass version");
}
}
public class C extends D implements I5, I6{
private int a;
public int help() {
System.out.println("from I6");
return 1;
}
public void help() {
System.out.println("sdkfj");
}
C () {
System.out.println("Tjis is D");
}
public void printThis() {
System.out.println("subclass version");
String x = "192.1.2.3";
System.out.println("hello");
}
public static void main(String args[]) {
new C().help();
}
}
Here i'm getting a compile time error:
Duplicate method help in type C
how do i overcome this problem. if i have 2 methods with same name in 2 interfaces. interfaces not serving the purpose of multiple inheritance.
Please reply soon. it's urgent.
Thanks,
Roopa.