title: When i call a method to return a value, it resets it back to 0
body: <pre><code>public void setSavingsBal(String q) throws FileNotFoundException, IOException
  {
      try
          {
             BufferedReader in = new BufferedReader(new FileReader("logininf.txt"));
             String l = "";
  
             while ((l = in.readLine())!=null)
             {
               String [] var = l.split("#");
               if(var[0].equals(q))
               {  
                   System.out.println(var[2]);
                   savingsBal = Double.parseDouble(var[2]);
  
               }
             }
  
          }
  </code></pre>
  
  <p>above it savingsBal has the value of 20</p>
  
  <pre><code>public double getSavingsBal()
  {
          System.out.println(savingsBal);
      return savingsBal;
  }
  </code></pre>
  
  <p>but when I retrieve it, it gives the value of 0</p>
  
  <pre><code>private void btnGetBalanceActionPerformed(java.awt.event.ActionEvent evt) {                                              
      Client cl1 = new Client();
      double balance;
      balance = cl1.getSavingsBal();
  </code></pre>
  
  <p>it seems as if the variable has not updated after the original set method.</p>