Skip to content
Advertisement

Tag: default-implementation

Can an interface method have a body?

I know that an interface is like a 100% pure abstract class. So, it can’t have method implementation in it. But, I saw a strange code. Can anyone explain it? Code Snippet: EDIT: My IDE is Intellij Idea 13.1. The project SDK is java 7 <1.7.0_25>. The IDE is not showing any compiler error. But, When I compile the code

Advertisement