Java | final keyword | Question 2

    Last Updated :
    Discuss
    Comments
    Output of following Java program Java
    class Main {
     public static void main(String args[]){
       final int i;
       i = 20;
       System.out.println(i);
     }
    }
    
    20
    Compiler Error
    0
    Garbage value
    Share your thoughts in the comments