What is the output of the following Java program?
class Main {
public static void main(String args[]){
final int i;
i = 10;
System.out.println(i);
}
}

10. What is the output of the following Java program?
class Main {
public static void main(String args[]){
final int i;
i = 10;
System.out.println(i);
}
}



What is the output of the following Java program? class Main { public static void main(String a..

Answer / hrindows@gmail.com

Output
10
Since i is the blank final variable. It can be initialized only once. We have initialized it to Therefore, 10 will be printed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is a Wrapper class?

14 Answers  


How does Vector implement synchronization?

4 Answers   Ness Technologies,


How do you bind variables?

0 Answers  


Which package has light weight components in java programming?

0 Answers  


Difference between String and String Buffer?

3 Answers  


What are JVM.JRE, J2EE, JNI?

0 Answers  


what is thread? : Java thread

0 Answers  


How to initialize an Applet ?

9 Answers   TCS,


What is token in java?

0 Answers  


What is substring of a string?

1 Answers  


What about interthread communication and how it takes place in java?

0 Answers  


What does flag mean in java?

0 Answers  


Categories