I have a question about thread-safety. By adding final
to the states variable, does it really make the class more thread safe? Since I am not doing anything with states but reading it I could as well forget about final
?
class UnsafeStates {
private String[] states = new String[] { "AK", "AL" /*...*/ };
public String[] getStates() {
return states;
}
}