If I could suggest something, it would be better if you follow oop. You have everything in one main class. You are using strings for "constants" which is not safe. Encapsulate the right elements into objects: Card and Deck. Next Card would have enums of cards (1,2,3,4,5) and suites (heart,...). Class Deck would have array of Card objects and method to initialise by going through values of all enums and creating cards. Next use collections.shuffle to shuffle it.
public class Card {
public enum CardType {
ONE,
TWO,
THREE;
}
public enum Suit {
HEARTS,
CLUBS,
}
private CardType cardType;
private Suit suit;
constructor && getters (...)
}
public class Deck {
List<Card> cards = new ArrayList<Card>();
public void init() {
for(CardType cardType : CardType.values()) {
for(Suit suit : Suit.values()) {
cards.add(new Card(cardType, suit));
}
}
Collections.shuffle(cards);
}
}
You can also give String names to enum types
public enum Suit {
HEARTS("of hearts");
private String toString;
public Suit(String toString) {
this.toString = toString;
}
@Override
public String toString() {
return toString;
}
}