Use of class definitions inside a method in Java
This is called a local class. 2 is the easy one: yes, a class file will be generated. 1 and 3 are kind of the same question. You would use a local class where you never need to instantiate one or know about implementation details anywhere but in one method. A typical use would be … Read more