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 t in generics in java?
List some java keywords sun like c, c + + keywords?
What is t in parametric equations?
What is meant by Servelet? What are the parameters of service method?
How can you share data between two thread in Java?
What are the differences between stringbuffer and stringbuilder?
Difference between serialization and deserialization in java?
Variable of the boolean type is automatically initialized as?
Name few java.lang classes introduced with java 8 ?
Difference between Applet & Application?
What is percentage in java?
Is there is any difference between a scrollbar and a scrollpane?