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);
}
}
Answer Posted / 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 View All Answers
How is Object Oriented Programming different from Procedure Oriented Programming?
What is difference between this and super keyword?
Is 0 an even number?
What is ascii code?
Can we access the non-final local variable, inside the local inner class?
What is difference between path and classpath?
What is a boolean output?
What are the advantages of inner classes?
what is comparable and comparator interface?
Describe the process as to how substring() methodology mechanisms in java.
What is default size of arraylist in java?
Is passing by reference faster?
What is null mean in java?
How to create an interface?
How does java pattern compile work?