• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Creating arrayList from array class

ganero

Lurker
I've been building simple card game, player will have 3 cards.
i have this cardPart class and i want to create array list from it

Code:
 public List<CardParts> parts = new ArrayList<CardParts>();

Code:
  parts.add(new CardParts());
<-- error here, i don't know how to declare it in the right syntax..

here is my CardParts class
Code:
public class CardParts {
    
    public CardParts(String[] picz) {
     
      
    }
}

i need to use array , so i can easily use the for loop and enter random number for each increment.. for example : parts = randomnumber;

if you confuse, simply this,
the plan is i need 3 cards , with each card can keep 11 data (array)
card1 = (1,2,3,4,5,6,7,8,9,0,A) , so on the other card <-- just like that..

please help me solve it with arraylist thing if you could.. , however if stuck, i am willing to use other method.. ,

thank you
 
Back
Top Bottom