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

Home > Java Programming > Inheritance > Questions and Answers

Q: class G{
int I,j;
abstract void test();
}
Public class Manager extends G{
public static void main(String args[]){
}
}
A. compile time error B. runtime error
C. manager D. A

Answer and Explanation

Answer:compile time error

Explanation:
abstract method can be declared only in abstract class , but here abstract method is declared inside a normal class, so it will throw compile time error.

Comment on this Question

Name:

Loading...




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