hi,
i'm getting to few items back from the call to subList(). i
know that the 'to' index is excluded but i just can't see what i'm doing wrong. any salient help, or better eyes, will be greatly appreciated. thanks.
n
public static void dealHands(){
NUMBER_OF_CARDS = 5;j = 0;
Collections.shuffle(cardDeck);
for(i=0;i<7;i++){
Set<PlayingCard> temp = new TreeSet<PlayingCard>();
temp.addAll(cardDeck.subList(j,j+NUMBER_OF_CARDS));
Iterator<PlayingCard> it = temp.iterator();
while(it.hasNext())
System.out.println(it.next().toString());
j+=5;
}
}