Example:

```
public class TestClass {

    public static void main(String[] args) {
        TestClass t = new TestClass();
    }

    private static void testMethod() {
        abstract class TestMethod {
            int a;
            int b;
            int c;

            abstract void implementMe();
        }

        class DummyClass extends TestMethod {
            void implementMe() {}
        }

        DummyClass dummy = new DummyClass();
    }
}

```

I found out that the above piece of code is perfectly legal in Java. I have the following questions.

1. What is the use of ever having a class definition inside a method?
2. Will a class file be generated for `DummyClass`
3. It's hard for me to imagine this concept in an Object Oriented manner. Having a class definition inside a behavior. Probably can someone tell me with equivalent real world examples.
4. Abstract classes inside a method sounds a bit crazy to me. But no interfaces allowed. Is there any reason behind this?