Inspectopedia Help

Local class

Reports local classes.

A local class is a named nested class declared inside a code block. Local classes are uncommon and may therefore be confusing. In addition, some code standards discourage the use of local classes.


void test() { class Local { // local class } new Local(); }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023