title: Perform Subtraction on list items in java
body: <p>I have two list which holds values from ResultSet. Is there any way through which I can subtract one list from another at specific indexes and display the result in tabular format.
  I have list in my code as</p>
  
  <pre><code>List&lt;Double&gt; all=new ArrayList&lt;Double&gt;();
  List&lt;Double&gt; al2=new ArrayList&lt;Double&gt;();
  al2.add(rs.getDouble(10));
  al2.add(rs.getDouble(11));
  all.add(rs.getDouble(11));
  </code></pre>
  
  <p>I want to do</p>
  
  <pre><code>al2 at rs.getDouble(11) - all at rs.getDouble(11)
  </code></pre>
  
  <p>Subtraction between two lists at particular column values.How to do this??</p>