Hi.. I just came across this conflicting way of defining interfaces by
java.
An interface can be given public or default access, but not private or protected access. Trying to compile the below code,
gives,
test.java:1: modifier protected not allowed here
protected interface test{}
whereas
compiles just fine
The question is why. It makes sense to prevent an interface being private. But since protected is a 'broader' specifier than default, an interface should logically be allowed to be protected I think. What is your opinion?