The A final object cannot be modified, but we can set its attributes:
final MyClass object = new MyClass(); object.setAttr("something");
Is it possible to do the same with final Integer and change its int value?
I ask because I call the worker:
public SomeClass myFunction(final String val1, final Integer myInt) { session.doWork(new Work() { @Override public void execute(...) {
And I need to set the value of myInt inside it.
I can declare my int inside another class and this will work. But I wonder if this is necessary.
source share