Compile the following code and run it. You'll get:
Exception in thread "main" java.lang.AbstractMethodError: Bar.doIt()Ljava/lang/String;
at JavacTest.main(JavacTest.java:8)
------------------------------------------------
public class JavacTest {
public static void main(String[] args) {
IBar b = new Bar();
String x = b.doIt();
}
}
class Foo<T> {
public final T doIt() { return null; }
}
interface IBar {
String doIt();
}
class Bar extends Foo<String> implements IBar {
}
###@###.### 2005-05-13 21:38:48 GMT