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

Home > Java Programming > Inheritance > Questions and Answers

Q: abstract class A{
abstract void test2();
}
Class B extends A
{
Void test1(){
System.out.println(“test”);
}
}
Class manager{
Public static void main(String args[]){
B b=new B();
b.test2();
}
}
A. compile time error B. runtime error
C. test D. none of the above

Answer and Explanation

Answer:compile time error

Explanation:
when ever you extend an abstract class you should implement all the abstract properties from super class, but here it is not done, so it will throw an compile time error. 

Comment on this Question

Name:

Loading...




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