title: Showing users input History
body: <p>I'm new to java. I have this codes for an ATM with deposit, withdraw, balance and history option.. and now my problem is the history option.. I really don't know how to make all users input into it..
  I try making one but it only shows 1 history of the last input... </p>
  
  <pre><code>package atm;
  
  import java.util.ArrayList;
  import java.util.Scanner;
  public class Atm {
  
      static Scanner input = new Scanner(System.in);
      static int choose,back;
      static double withdraw,balance,deposit,depos,post;
      static String us,username="admin",ps,password="admin";
      static int []array;
      public static void main(String[] args) {
          System.out.println("\t Welcome Visitors");
          start();
      }//end of main
      public static void hello(){
          System.out.println("\t\tHello: "+username);
          options();
      }
      public static void start(){
          try{
              System.out.println("\t Username: ");
              us=input.nextLine();
              if(us.equalsIgnoreCase(username)){
                  password();
              }
              else{
                  System.err.println("Incorrect Username");
                  start();
              }
          }//end of try
          catch(Exception a){
              System.err.print("\t Invalid Input");
              start();
          }//end of catch(Exception a)
      }//end of  public static void start()
      public static void password(){
          System.out.println("\t Password: ");
          ps=input.nextLine();
          if(ps.equalsIgnoreCase(password)){
              hello();
          }
          else{
              System.err.println("Incorrect Password");
              password();
          }
      }
      public static void depot(){
          array=new int[1];
          System.out.println();
          System.out.println("\t========================");
          System.out.println("\t| Input Amount to Deposit: ");
          deposit=input.nextDouble();
          System.out.println();
          System.out.println("\t========================");
          System.out.println("\t| Successfully Deposited|");
          System.out.println("\t| $"+deposit+" in your account  |");
          System.out.println("\t========================");
          System.out.println();
          calculateDepot(deposit);
          options();
      }//end of static void deposit();
      public static void calculateDepot(double depot){
          balance=balance+depot;
          calculateHist(deposit);
          options();
      }//end of public static void calculateDepot(double depot)
      public static void withd(){
          System.out.println("\t========================");
          System.out.println("\t| Input Amount to Withdraw ");
          withdraw=input.nextDouble();
          if(withdraw&gt;balance){
              System.out.println();
              System.err.println("\t=============================");
              System.err.println("\t| Sorry You Dont Have        |");
              System.err.println("\t| Enough Balance to Withdraw |");
              System.err.println("\t=============================");
              System.out.println();
              withd();
          }
          else{
              System.out.println();
              System.out.println("\t========================");
              System.out.println("\t| Successfully Withdraw|");
              System.out.println("\t| $"+withdraw+" in your account");
              System.out.println("\t========================");
              System.out.println();
              calculateWithd(withdraw);
              options();
          }
      }//end of static void withdraw
      public static void calculateWithd(double withd){
          balance=balance-withd;
          options();
      }//end of public static void calculateWithd(double withd)
      public static void bal(){
          System.out.println();
          System.out.println("\t========================");
          System.out.println("\t| Your Total Balance is");
          System.out.println("\t| $"+balance);
          System.out.println("\t========================");
          System.out.println();
          options();
      }//end of static void balance
      public static void calculateHist(double depot){
          depos=depot;
          options();
      }
      public static void hist(){
          System.out.print("\t|"+depos);
          options();
      }//end of static void history
      public static void options(){
          System.out.println("\t========================");
          System.out.println("\t| Choose Your Option    |");
          System.out.println("\t========================");
          try{
              System.out.println("\t========================");
              System.out.println("\t|  [1] Deposit          |");
              System.out.println("\t|  [2] Withdraw         |");
              System.out.println("\t|  [3] Balance          |");
              System.out.println("\t|  [4] History          |");
              System.out.println("\t|  [5] Exit             |");
              System.out.println("\t========================");
              choose=input.nextInt();
              if(choose==1){
                  depot();
              }//end of if(choose==1)
              else if(choose==2){
                  if(balance==0){
                      System.err.println();
                      System.err.println("\t=============================");
                      System.err.println("\t| Sorry You Dont Have        |");
                      System.err.println("\t| Enough Balance to Withdraw |");
                      System.err.println("\t=============================");
                      System.err.println();
                      options();
                  }
                  else{
                  withd();}
              }//end of else if(choose==2)
              else if(choose==3){
                  bal();
              }//end of else if(choose==3)
              else if(choose==4){
                  hist();
              }//end of else if(choose==4)
              else if(choose==5){
                  System.out.println();
                  System.out.println("\t| GoodBye! Thank You |");
                  System.out.println();
              }//end of else if(choose==5)
              else if(choose&lt;=6){
                  System.err.print("\t| Invalid Input |");
                  options();
              }//end of else if(choose&lt;5)
          }//end of try
          catch(Exception b){
              System.err.print("\t| Invalid Input |");
              input.nextLine();
              options();
          }//end of catch
      }//end of static void option
  }//MAIN END
  </code></pre>