Why abstract class in Java can't be static ?
static abstract class A {
abstract void display();
}
class B extends A {
void display() {
System.out.println("Inside class A");
}
}
public class Main {
public static void main(String[] args) {
A b = new B();
b.display();
}
}
Above code is giving error: modifier static not allowed here
Tried to understand but couldn't figure it out.