Search:

Type: Posts; User: Squiffy

Search: Search took 0.09 seconds.

  1. Replies
    9
    Views
    6,344

    Re: Using the ArrayList Class

    Hey nice work. But I'd suggest one small change. Your getTransactions() method should simply "return transactions", nothing else.

    In your main, then you can do: ArrayList transactions =...
  2. Replies
    9
    Views
    6,344

    Re: Using the ArrayList Class

    I think your Account class looks OK. But you need a getTransactions() method that returns the ArrayList of transactions.

    The Transaction class does not need a list of transactions though. In your...
  3. Replies
    9
    Views
    6,344

    Re: Using the ArrayList Class

    Firstly, you need to make sure that the transaction arraylist in your Account class is set to a new arraylist somewhere. Otherwise you've just got an empty reference that could refer to an array list...
Results 1 to 3 of 3