Why does java allow this
public class A {
private int i;
public A(int i){
}
}
but not this
public class A {
private final int i;
public A(int i){ // compile - time error
}
}
What is the difference push the item to the stack when it is final ? Why doesn't it understand that A(i) is different than final int i ?