Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.08 seconds.

  1. Replies
    9
    Views
    1,178

    Re: What is wrong with my ArrayList?

    You need to think about what exactly you're trying to do.

    Write a test program that programatically adds a few Accounts with hardcoded names to an ArrayList of Accounts. Then write a function that...
  2. Replies
    9
    Views
    1,178

    Re: What is wrong with my ArrayList?

    Your ArrayList only holds Accounts:

    ArrayList<Account>account = new ArrayList<Account>();

    You never add any Strings to that ArrayList. In fact, that would cause a compiler error. Yet you check...
  3. Replies
    9
    Views
    1,178

    Re: What is wrong with my ArrayList?

    You're only ever adding in Accounts to your ArrayList. It will never contain a String.
  4. Replies
    9
    Views
    1,178

    Re: What is wrong with my ArrayList?

    I would recommend creating a test program: can you write a simple main method that initializes an ArrayList, adds 10 Objects to it, then prints the ArrayList out? Which part of that simple program...
  5. Replies
    9
    Views
    1,178

    Re: What is wrong with my ArrayList?

    I would recommend creating a test program: can you write a simple main method that initializes an ArrayList, adds 10 Objects to it, then prints the ArrayList out? Which part of that simple program...
Results 1 to 5 of 5