title: How can I subtract from arraylist some values ?
body: <p>Here is an example: </p>
  
  <pre><code>public static ArrayList&lt;Integer&gt; position = new ArrayList&lt;Integer&gt;();
  public static ArrayList&lt;Integer&gt; new_position = new ArrayList&lt;Integer&gt;();
  
  Collections.copy(new_position, position);
      for (int j = 0; j &lt; position.size(); j++) {
  
          new_position.get(j) -=4;
      }
  </code></pre>
  
  <p>I want to copy values and then from my new arraylist subtract 4. How can I make it ? 
  I'm new in java. Also I've got an error such as: <code>The left-hand side of an assignment must be a variable</code>, it refers to <code>nowe_pozycje.get(j) -=4;</code>.</p>