As everyone knows, Java 9 interfaces will support private
method also. So now in interfaces you can declare private
method as well as default
method. Both the method should have body(I can say it as similarity). I found some questions like this Java 9: private interface methods, example use-case?, didn't found more points.
As per my understanding I found one differences :
default
methods of the interfaces are visible in the subclass, where as private
method is not visible because of the private
modifier.
My question is, any other difference are there apart from that?. When we have to go for private
method and default
method when designing the API or structure.