When I\'m trying to compile the following code
public interface SomeInterface{
private static Logger logger = Logger.getLogger();
public default voi
Interface is like a blueprint of any class, where you declare your members. Any class that implement that interface is responsible for its definition. Private members can only be accessed by same class member, which does not make sense in terms of interface. Protected members can be accessed by same class member and inherited class members, but in case of interface we never extend an interface, we implement it. So any interface can only contain public methods generally,