Q:

Inner class with main method doesn't compile

abstract class Manager {

    static void test() {
        System.out.println(12);
    }

    class Manager1 {
        public static void main(String args[]) {
            System.out.println(Manager.test());
        }
     }
}

It's producing a compile time error. Can an abstract class have a static method with void type?

A:

Non-static inner classes cannot have static methods - only top-level and static classes can (as per JLS §8.1.3).
Furthermore:
System.out.println(Manager.test());

Manager.test() is void: you can't print that.

