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);
}
}
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 |
What is a Wrapper class?
How does Vector implement synchronization?
How do you bind variables?
Which package has light weight components in java programming?
Difference between String and String Buffer?
What are JVM.JRE, J2EE, JNI?
what is thread? : Java thread
How to initialize an Applet ?
What is token in java?
What is substring of a string?
What about interthread communication and how it takes place in java?
What does flag mean in java?