Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

ArrayList, java

$
0
0
I have problem to change the array to ArrayList.
ArrayList<Card> deck = new ArrayList<Card>();
public void createDeck(){
		for (int i=0; i<families.length; i++){
			for (int k=0; k<members.length; k++){
				deck[i * 4 + k] = new Card(families[i], members[k],occupations[i]);
			} // the "deck[i*4+k]" has to change to ArrayList type
		} 
	} 


Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>