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

Home > Java Programming > Interface > Questions and Answers

Q: Interface A{
Int test();
}
Class Manager{
Public static void main(String args[]){
A a1=new A();
a1.test();
} }
A. 1 B. compile time error
C. runtime error D. none of the above

Answer and Explanation

Answer:compile time error

Explanation:
We cannot create an object of an interface, if you try it will throw an error.

Comment on this Question

Name:

Loading...




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