A local class is declared locally within a block of Java code, rather than as a member of a class . Typically, a local class is defined within a method, but it can also be defined within a static initializer or instance initializer of a class.
Read more