local inner class in Java

A local inner class is a nested class defined within a method. Like local variables, a local inner class declaration does not exist until the method is invoked, and it goes out of scope when the method returns. This means that you can create instances only from within the method. Those instances can still be returned from the method. This is just how local variables work. Local inner classes have the following properties:
* No access specifier. Already local to method.
* Can extend any class and implement any number of interfaces
* Can be abstract 
* Can be final
* Can access instance members of enclosing class including private members
* Can not access local variables of a method unless those variables are final or effectively final. The compiler is generating a class file from your inner class. A separate class has no way to refer to local variables. If the local variable is final, Java can handle it by passing it to the constructor of the inner class or by storing it in the class file. If it weren’t effectively final, these tricks wouldn’t work because the value could change after the copy was made. Up until Java 7, the programmer actually had to type the final keyword. In Java 8, the “effectively final” concept was introduced. If the code could still compile with the keyword final inserted before the local variable, the variable is effectively final. 
* Can not be declared static 
* Cannot declare static fields or methods. Because an instance of an inner class is implicitly associated with an instance of its outer class, it cannot define any static methods itself. 
```
public class Class{
    public static void main(String []args){
        int j = 2;
        for (int i = 0; i< 5; i++) {
            class LocalClass {
                void say(int i) {
                    System.out.println(i*j);
                }
            }
            LocalClass local = new LocalClass();
            local.say(i);
        }
    }
}
```