Question: What will be the output for the below code? public class Sample { public static void main ( String a [ ] )

What will be the output for the below code?
public class Sample\{
public static void main(String a[])\{ int i_val;
System.out.println("i_val value: "+i_val); \}
\}
- Compile time Error
Nothing will be printed
Runtime Error
Prints "i_val value : 0"
Submit
(c)2017 WIPRO LTD | WWW.WIPRO.COM | CONFIDENTIAL
What will be the output for the below code?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!