public access modifier for interface methods?
One of hundreds of answers available with our premium content service.
A: Java interface methods are always implicitly public, even if they belong to nested interfaces. Non-public modifiers are not valid or necessary for interface methods, so the compiler should fail and warn you in this case. Nested interfaces may be declared protected or private, but the methods they define must still follow this rule, as summarised below.
… full answer hidden
Premium members click below for full answer
Should I use a public access modifier for interface methods?