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

Home > Java Programming > Interface > Questions and Answers

Q: Interface A{
Public static final int i=10;
Final float f=100.0f;
Static public String S;
}
A. compile time error B. runtime error
C. 100.0f D. 10

Answer and Explanation

Answer:compile time error

Explanation:
In an interface all the variables are public static final, and final variable should be initialized, here variable S is not initialized 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.