Is it possible to make anonymous inner classes in Java static?
No, you can’t, and no, the compiler can’t figure it out. This is why FindBugs always suggests changing anonymous inner classes to named static nested classes if they don’t use their implicit this reference. Edit: Tom Hawtin – tackline says that if the anonymous class is created in a static context (e.g. in the main … Read more