Originally posted by Thomas Paul:
Abstract Classes
----------------
1. Abstract classes can not have constructors as they can never be constructed.
Thomas,
I think abstract class can have constructor(s), although it doesn't make sense. See the following code, it compiles and runs well and outputs 1.
abstract class
Test {
static int i=1;
Test() {i=5;}
public static void main (
String[] args) {
System.out.println(Test.i);
}
}