Abstract just means you can't instantiate the class directly. You can have constructors if you want - they might be needed for subclasses to initiate the object state. You can have static methods (including main()) - and they don't need an object so calling them is fine.
So you only got errors when you tried to create the object, which is when you run into the abstract limitation.
What did you expect to happen differently?
Joined: Jan 13, 2008
I had thought that one can not run even a main method inside an abstract class.
Because even java interpreter need to load the class before running main. For that it need to have a constructor and if it loads a class which is abstract it can not instantiate the object and thus can not run main inside it.
Loading a class is not the same as creating an instance of the class. And there's no need to create an instance of the class to call main(), because it's static. So there's no problem, and the lack or otherwise of a constructor is irrelevant.
Remember these point for classes..
1. every class(including Abstract class) is having a default no-args constructor(until and unless,you yourself give the args constructor) given by the compiler which is having the same visibility as of class..
2.And one more thing you can even have a abstract class that has no abstract methods.
3.You cannot instantiate a abstract class.