PRINT AND SHUFFLE A DECK OF CARDS(HELP!)
//What am I missing and doing wrong? public class Card { class Card { int suit, rank; public Card() { this.suit = 0; this.rank = 0; } public Card(int suit, int rank) { this.suit = suit; this.rank = rank; } public String printCard(Card c) { String[] suits = { "Clubs", "Diamonds", "Hearts", "Spades" }; String[] ranks = { "narf", "Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"}; System.out.println(ranks[c.rank] + " of " + suits[c.suit]); return ranks[this.rank] + " of " + suits[this.suit]; } public static void printCard(Card c) { String[] suits = { "Clubs", "Diamonds", "Hearts", "Spades" }; String[] ranks = { "narf", "Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"}; System.out.println(ranks[c.rank] + " of " + suits[c.suit]); } public static void shuffleArray(Card[] cards) { for (int i = 0; i <= cards.length; i++) { swap(0, 100); } } public static void swap(Card[] cards, int i, int j) { Card temp = this.cards[i]; this.cards[i] = this.cards[j]; this.cards[i] = temp; } public static void printStrings(String[] strs){ for (int i = 0; 1 < strs.length; i++) { System.out.println(strs[i]); } } public static void main(String[] args){ Card[] cards = new Card[52]; shuffleArray(cards); printStrings(cards);