Příklad

public class ClassA {
private String a;
private Statement s;
public void methodA {

try {
s.execute(a, 3);
} catch ( Error e ) {
//...
}
}

}
Řešení
Deklarujte 'a' jako konečný.

public class ClassA {
private final String a;
private Statement s;
public void methodA {

try {
s.execute(a, 3);
} catch ( Error e ) {
//...
}
}

}