title: How to get total value into a double or a vector
body: <p>I want to get all the "Amount" value total of specific account number into a double or into a vector. Because of my database having many transactions for same account number i can't figure out how to get total value of all the records.My code giving me the last transaction amount value only not the sum of all. Appreciate any help </p>
  
  <pre><code> ResultSet rs5 = (ResultSet) st1.executeQuery("SELECT Amount FROM  Incoming_Transactions WHERE  AccountNumber LIKE '" + accountnum+  "%'");
          while (rs5.next()) {
              Vector &lt;Double&gt; em = new Vector();
              em.add(rs5.getDouble("Amount"));
  
              Double [] myArray = em.toArray(new Double[0]);
              check2 = myArray[0];
  
  
          }
  </code></pre>