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

Home > Java Programming > Inheritance > Questions and Answers

Q: abstract interface class G{
void test();
}
Public class Manager extends G{
Void test()
{
System.out.println(“manager”);
}
public static void main(String args[]){
Manager m=new Manager();
m.test();
}
}
A. compile time error B. runtime error
C. manager D. A

Answer and Explanation

Answer:compile time error

Explanation:
you can not declarea class as both abstract and interface, and inside that class they have declared a test(); but without a method that is also an error. So compile time error.

Comment on this Question

Name:

Loading...




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