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

Home > Java Programming > Final and Datatypes > Questions and Answers

Q:  Public class Manager{
Static final String name;
Public static void main(String args[]){
System.out.println(name.length()); }
}
A. 0 B. null
C. compile time error D. runtime error

Answer and Explanation

Answer:compile time error

Explanation:
final variable should be initialized , here without initializing they are trying to access the value of name variable 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.