36+ Java Protected Method In Interface US. We can take advantage of this fact and use protected for interface methods for this new feature. Private and protected access in interfaces were postponed to java 9.
It is strange because protected abstract method are allowed in an abstract class. Java interface default methods are abstract methods and some new updates since java 8. Technically, we could extend the hidden class in an interface that also extends the.
In java 9 and later versions, an public vs protected vs package vs private access modifier in java.
We can take advantage of this fact and use protected for interface methods for this new feature. The java language specification doesn't currently allow the protected modifier for interface methods. What this means is that if you have legacy code written in java 7 or. We can take advantage of this fact and use protected for interface methods for this new feature.