When I\'m trying to compile the following code
public interface SomeInterface{ private static Logger logger = Logger.getLogger(); public default voi
Interfaces are not classes. They have no private state. Even a public logger in the interface is a design smell and an abuse of interfaces.
The use case for static fields in interfaces is mainly for compile-time constants, not for stateful objects.