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 immutable class? how to make a Class explicitly "Immutable"?Wap to make a class explicitly immutable.
what is the use of clone method? why user cant overwrite in sub class without its proper defination.
What is formatted output?
Hi Friends, can you give difference between extending thread class and implementing runnable interface.
Does garbage collection guarantee that a program will not run out of memory?
Does java arraylist maintain insertion order?
what is marker interface ? what is the necessity of it?
what is wrapper class and its uses?
Why local variables are stored in stack?
What is low level language in computer?
what is session in java?
0 Answers Seventhsense Technologies,
what is data binding? give the example