They can't be private...what's the point of a private interface method? It can't be called by anything.
It can't be protected for a similar reason. Interfaces are simply for exposing public functionality to other classes. If you want protected status, then create a new class and inherit the methods, because protected restricts access to the class tree I guess you have to stand back and look at what the "Interface" design is for. It is to allow objects that possibly come from different packages and even vendors (this is the basis for J2EE design and implementation) to interoperate with a known reference point.
If you need to hide methods between your own modules (which this appears, to me, to be your problem) then you should be able to accomplish it with an Abstract Class and get around your issues? Of course, you can also use the default (no) access modifier to allow only package classes and subclasses to call the methods of an interface.
Chat with our AI personalities
public
This is not necessarily true. The only rules for this are that interface methods may not be private. They may be public, protected, or have the default (blank) access modifier.
Constants and abstract methods. That's it.
Any function or method in Java that is coded by the programmer is called a user defined method in Java. The JAVA API (Application Programming Interface) has a set of predefined classes & methods that are for our usage. Whatever methods we create apart from these are termed as user defined methods. In java we not use the term functions. We call them "Methods"
ContentHandler