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