Why the interface references shows toString(), hashCode() and other Object’s method

If an interface does not extends Object class then why the interface references shows toString(), hashCode() and other Object’s method.

Jon Skeet
people
quotationmark

Because that's the way the language is designed. Any class implementing the interface will definitely have Object as an ultimate ancestor, so at execution time, those methods will definitely be available.

This is specified in JLS 9.2:

If an interface has no direct superinterfaces, then the interface implicitly declares a public abstract member method m with signature s, return type r, and throws clause t corresponding to each public instance method m with signature s, return type r, and throws clause t declared in Object, unless an abstract method with the same signature, same return type, and a compatible throws clause is explicitly declared by the interface.

people

See more on this question at Stackoverflow