Welcome Guest | Sign in | Register
Flow Control - Discussion Page For Q.2798 | 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(“hello”);
}
}
A. compile time error B. run time error
C. hello D. no output

Answer and Explanation

Answer:hello

Explanation:
here I variable is a local variable , local variable should be initialized before the use , here they not using it they just declared it,so it will display normal output, it will not show any error.

Comment on this Question

Name:

Loading...




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