Multiple Choice Question

QID: 
3
Validated against: 
java8
Question: 

Given:

abstract class Abstract1 {

  public abstract static void main(String[] args);

}

abstract class Concrete1 extends Abstract1{

  public static void main(String[] args) {

   System.out.println("I am an abstrsct class"); 

}

}

What will be the result is we compile and run Concrete1?

Select 1 option:

A. Class Abstract1 will not compile

B. Classes will compile, but will fail at runtime as Concrete1 is an abstract class

C. Class will compile, run and print "I am an abstract class"

D. Class will compile, run and print nothing

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!