An interface that contains methods whose return types clash with protected methods on java.lang.Object can never be implemented, because methods cannot be overloaded based simply on their return type.

If the interface is useful, name methods so that they do not clash with methods in Object. Otherwise you should delete the interface.

In the following example, the interface I is useless because the clone method must return type java.lang.Object:

Any attempt to implement the interface produces an error:

InterfaceCannotBeImplemented.java:6: clone() in C cannot override
  clone() in java.lang.Object; attempting to use incompatible return
  type
found   : int
required: java.lang.Object
  public int clone() {
             ^
1 error
  • Help - Eclipse Platform: Java Compiler Errors/Warnings Preferences.
  • Java Language Specification: 9.2 Interface Members.