Here is my simple code from a Java Tutorial.
public interface AnimalIntf {
default public String identifyMyself(){
return "I am an animal.";
}
}
I get an error: illegal start of type interface methods cannot have body. The method is default and the default keyword is used at the beginning of the method signature. Could you please explain to me what is wrong?