This is copied from 4053725.
frog:~/workspaces/test/4053725 $ cat -n T.java
1 interface J {
2 void notify();
3 }
frog:~/workspaces/test/4053725 $ newjavac T.java
T.java:2: notify() in J cannot override notify() in java.lang.Object; overridden method is final
void notify();
^
1 error
frog:~/workspaces/test/4053725 $
frog:~/workspaces/test/4053725 $ cat -n T.java
1 interface J {
2 void notify();
3 }
frog:~/workspaces/test/4053725 $ newjavac T.java
T.java:2: notify() in J cannot override notify() in java.lang.Object; overridden method is final
void notify();
^
1 error
frog:~/workspaces/test/4053725 $
- relates to
-
JDK-4053725 javac treats Object as a direct supertype of all interfaces
- Closed