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 |
Define interface?
Does java support function overloading, pointers, structures, unions or linked lists?
2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?
How to check if linked list contains loop in java?
What are the types of relation?
What is the return type of a program?s main() method?
What are runtime exceptions?
In method overloading ,if i change the return type to Long instead of INT,is the program execute
How to create packages in java?
how to handled exceptions & erros in ejb?
What is difference between iterator and enumeration in java?
Does variable declaration allocate memory?