I have an interface like below.
I got this default code in Eclipse. Confused, Why the "@Override" attribute is coming?
Is there any other TOP level default interface is available where we have declared all these methods and later implemented in Object class?
public interface IRecord {
@Override
public String toString();
public void showName(String name);
}
And its one implementation like below
public class Record implements IRecord{
@Override
public void showName(String name) {
//Doing something
}
}
It's getting complied very well as expected but I am little surprised why its not asking me to implement toString()
method's implementation?
It's there in Object class but Object class is not implementing my interface.