What is the output of the following Java program no. 11?

  1. class Main {
  2.  public static void main(String args[]){
  3.    final int i;
  4.    i = 20;
  5.    System.out.println(i);
  6.  }
  7. }

Output

20

Explanation

Since i is the blank final variable. It can be initialized only once. We have initialized it to 20. Therefore, 20 will be printed.