You can. But here is what O'Reilly says :
Nested classes in interfaces?
Java supports the concept of nested classes in interfaces. Syntax and dynamics work just like nested classes declared in a class. However, declaring a class nested in an interface would be extremely poor programming. An interface is an abstraction of a concept, not its implementation. Therefore, implementation details should be excluded from the interfaces. Remember that just because you can cut off your hand with a saw does not mean that it is a particularly good idea.
However, I could see the argument for the static utility class nested in the interface. Although why it would have to be invested in an interface, and not be an autonomous class, this is completely subjective.
source
share