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 |
If I only change the return type, does the method become overloaded?
How many types of flags are there?
Explain a few methods of overloading best practices in java?
What are java methods?
Why arraylist is not synchronized in java example?
What is the meaning of I ++ in java?
Difference between process and thread?
What super () does in java?
Explain different ways of passing arguments to sub-routine?
What are the different http methods?
Why do we need autoboxing in java?
Difference between method overloading and overriding.