Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CardDrive
- {
- public static void main( String[] args )
- {
- int randomcard = (int) (Math.random()*10)+1;
- // int randomLetter = (int) Math.random()*3;
- CardClass[] myHand = new CardClass[4];
- CardClass blackcard = new CardClass();
- myHand[0] = blackcard;
- CardClass numbercard = new CardClass(randomcard, "Hearts" , "A");
- myHand[1] = numbercard;
- CardClass facecard = new CardClass(randomcard, "Diamonds" , "J");
- myHand[2] = facecard;
- for(int index = 0; index < myHand.length; index++)
- {
- System.out.println(myHand[index]);
- } // end for
- } // end main method
- } // end class CardDrive
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement