I was reading the book "Head First Java" and at some point it mentioned that an inner class instance must be tied to an outer class instance, which I was already aware of, but with an exception:
A very special case—an inner class defined within a static method. But you might go your entire Java life without ever encountering one of these.
I'm pretty sure that last statement is indeed true, but if the compiler allows it to happen it means that it exists for a reason, otherwise it would be illegal Java. Can someone show me an example of where this would be useful?