Look at
java API
doc for class Object, and look at all the public instance methods.
An interface, if it has no direct superinterfaces, implicitly has all those methods abstract.
For example.
In Object class has a public instance method:
Well every interface has a method like that
But it's a compile time error if you declare a method that in Object is final. For example you can't write an abstract method in your interface
or
since in class Object is declared final. So you would get the following compiler error
...I cannot override notify() in java.lang.Object; overridden method is final
public abstract void notify();
^
1 error
Now look at this example. It will cause a Runtime exception (NullPointerException) but it compiles fine
As you can see interface
I has implicitly the method toString()