I am new to java. When I was going through language specification I found that static classes cannot be declared, but we can have static inner classes. I am little confused
AFAIK,if it will allow the top level classes to be declared as static class then it will hold the reference in the heap memory all the time even when you are not using it.and that is what called Memory Leak.so that is why it is restricted to do so.