Starting with Java 8,
default methods were introduced into interfaces. Effectively, this means that not all methods in an
Starting with Java 9 (maybe),
private methods will be allowed. This means that not all methods in an
The question "Should methods in a Java interface be declared with or without the
public access modifier?" was asked at Stack Overflow at https://stackoverflow.com/questions/161633/should-methods-in-a-java-interface-be-declared-with-or-without-a-public-access-m
There, most of the answers argued that
public abstract should not be used because no method in an
interface can be anything other than
public abstract. That is no longer the case.
So, in light of these new features of interfaces, should the
public abstract keywords be used in a Java interface method declaration?
In my specific environment, we will have people who are experienced software engineers, but not experienced in Java, reading Java code from time to time. I feel that leaving out the
public abstract keywords will now create an additional point of confusion for those not familiar with the history of how interfaces came to have different rules for using these keywords.