Submitted by jjadmin on Tue, 08/18/2015 - 12:43
Given:
abstract class Abstract1 {
public static void main(String[] args) {
System.out.println("I am an abstrsct class");
}
}
abstract class Concrete1 extends Abstract1{
}
What will be the result is we compile and run Concrete1?
Select 1 option:
A. Class Abstract1 will not compile as abstract classes cannot have main method
B. Classes will compile, but will fail at runtime as Concrete1 does not have a main method
C. Class will compile, run and print "I am an abstract class"
D. Class will compile, run and print nothing