Below is the code where I have initialized twice the final variable. But I have read that final variable can be initialized only once. Can anyone explain me why I can initialize two different value for a single final variable.
class outer
{
private final int x;
public outer(){
x = 8;
}
public outer(int value){
x = 9;
}
public static void main(String args[]){
outer ot = new outer();
System.out.println(ot.x);
}
}