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 |
how to print the below in java? * * * * * * * * *
What exceptions occur during serialization?
how to use crystal reports in java
What is java lang string?
Is it possible to compare various strings with the help of == operator? What are the risks involved?
what is meaning of JIT?
Enlist few advantages of inheritance?
Is it necessary that each try block must be followed by a catch block?
How many types of memory areas are allocated by JVM in java?
Name container classes in java programming?
What is getkey () in java?
Why there are some null interface in java? What does it mean?