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

Home > Java Programming > Flow Control > Questions and Answers

Q: class A{
Public static void main(String args[]){
int i;
System.out.println(i);
}
}
A. compile time error B. run time error
C. no out put D. 0

Answer and Explanation

Answer:compile time error

Explanation:
here I variable is a local variable , local variable should be initialized before the use , but they are using without initializing that’s why it is throwing compile time error.


Comment on this Question

Name:

Loading...




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