I tried earlier and just got more confused so i will try and be more precise. I am making an app in which i have a deck of 7 cards. I want to click on the deck and have one of
You should be keeping the cards in an array or List
of some kind. Then, you can refer to them by their number. For example:
ArrayList deck = new ArraList();
//Fill the ArrayList. Maybe shuffle it.
selectedCard = ArrayList.get(randomNumber);
Card
could simply be String
or something, instead. I don't know what sort of object you're using for it.