Java does not allow enum to be declared in a method that is a basic java syntax.
But
Could any body explain why is that, what could have gone wrong if it would have been allowed by Java, I am sure there must be some cause behind this restriction, any idea?
class Example {
    void aMethod() {
        //This is not allowed
        enum Status {
            NEW,
            PROCESSING,
            COMPLETED;
        }
    }
}
 
    