Search:

Type: Posts; User: helloworld922

Search: Search took 0.24 seconds.

  1. Replies
    7
    Views
    2,922

    Re: ArrayList confusion

    The generic parameter does not allow you to add strings.


    ArrayList<Card> cards; // this can only hold objects of the type Card

    You must construct a card object based off of the string in...
  2. Replies
    7
    Views
    2,922

    Re: ArrayList confusion

    The ArrayList implementation is built off of Arrays. Basically anywhere you can use Arrays it can be replaced by an ArrayList. While the other way around is also true*, it can (and usually does)...
Results 1 to 2 of 2