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 thread? What are the high-level thread states? : Java thread
whether java is fully object oriented language or partially object oriented language
List two java ide’s?
What is the latest java version?
What are the advantages of autoboxing?
What is type safety in java?
What about interrupt() method of thread class ?
what is nested class in java?
Why is a singleton bad?
What is difference between public static and void?
What is java full form?
What is the default initialized value of a boolean type variable?