Welcome Guest | Sign in | Register
Abstract - Discussion Page For Q.2459 | Java Programming Questions and Answers | Java Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Abstract > Questions and Answers

Q: Abstract class Foo {
Public static void main (String args[]){
System.out.println (“Foo”);
}
}
A. compile time error B. runtime error
C. foo D. none of the above

Answer and Explanation

Answer:foo

Explanation:
Here Foo is a abstract class. An abstract class can contain non-abstract method.

In the example, main ( ) method is a non-abstract method so it will not throw any error. It will display Foo.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved 2012-2015 SoftLucent.