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 |
Explain the difference between protected and default access.
What is the range of the short type?
Outline the major features of java.
How is Object Oriented Programming different from Procedure Oriented Programming?
What is scope & storage allocation of global and extern variables? Explain with an example
What problems will occur when you don?t use layout managers?
write a program to create an arraylist with string(add,remove) operation.and value should be enter through keyboard.
What is == in java?
What is the is a and has a relation ship in oops concept in java?
Can java run on google chrome?
How we can make copy of a java object?
What is meant by polymorphism?