Member inner classes can’t have static members in them. When my friend ran the same code on her eclipse IDE she got a compiler error for a static member in a non static inner class. When I run the code there are no errors. Why?
This is the code:
public class Outer {
class Inner {
static void method() {
System.out.println("Static method in Inner Class");
}
}
}