Search:

Type: Posts; User: pbrockway2

Search: Search took 0.08 seconds.

  1. Replies
    5
    Views
    2,580

    Re: constructor with an arraylist parameter?

    You're welcome.
  2. Replies
    5
    Views
    2,580

    Re: constructor with an arraylist parameter?

    Call the class what it is: Pack. The deck.add() stuff belongs in its constructor - what you posted won't compile. (Which might explain compiler's grumbling. Statements have to go inside a method...
  3. Replies
    5
    Views
    2,580

    Re: constructor with an arraylist parameter?

    Consider making a Pack class to represent a pack of cards. (One class: one thing. Whatever sort of thing this Main class is, it is unlikely it is a pack of cards.)

    Then give Pack a shuffle()...
Results 1 to 3 of 3