I have read the question here: http://stackoverflow.com/questions/2229389/is-it-problematic-to-assign-a-new-value-to-a-method-parameter. However it is not clear to me if doing something like:
public void myMethod(Object obj) {
doSomething(obj);
obj = getNewObj();
}
or:
public void anotherMethod(Object obj) {
obj = doSomething(obj):
}
This is basically just to avoid declaring a new local variable, is this worth it?, is this seen as a bad practice?.