title: "Local variable is redundant" using Java
body: <p>Why is the following giving me a &quot;local variable is redundant error&quot;?</p>
  <pre><code>public double depreciationAmount() {
      double depreciationAmount = (cost * percentDepreciated);
      return depreciationAmount;
  }
  </code></pre>