CSS font stacks & developer FAQs with Web standards
Site navigation below

One of hundreds of answers available with our premium content service.

Part answer

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

Click for full answers

Premium members click below for full answer
Should I use a public access modifier for interface methods?

Home · Web fonts · Font stacks · FAQs · Java · CSS · Javascript · HTML · Site manager