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);
}
}



What is the output of the following Java program? class Main { public static void main(String a..

Answer / hrindows@gmail.com

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

Post New Answer

More Core Java Interview Questions

Explain the difference between protected and default access.

0 Answers  


What is the range of the short type?

0 Answers  


Outline the major features of java.

0 Answers  


How is Object Oriented Programming different from Procedure Oriented Programming?

0 Answers   Amdocs,


What is scope & storage allocation of global and extern variables? Explain with an example

0 Answers   IBS,






What problems will occur when you don?t use layout managers?

1 Answers  


write a program to create an arraylist with string(add,remove) operation.and value should be enter through keyboard.

0 Answers   Axcend,


What is == in java?

0 Answers  


What is the is a and has a relation ship in oops concept in java?

9 Answers   BearingPoint, TCS,


Can java run on google chrome?

0 Answers  


How we can make copy of a java object?

0 Answers  


What is meant by polymorphism?

0 Answers  


Categories