lundi 6 septembre 2021

How to pick random element from 2d String array in java

Hi Im a newbie at java programming and i have a problem with getting an element from my 2d string array plss help me

Here is my array

String[][] cardDeck = { 
            { "AceH", "2H", "3H", "4H", "5H", "6H", "7H", "8H", "9H", "10H", "JackH", "QueenH", "KingH" }, 
            { "AceD", "2D", "3D", "4D", "5D", "6D", "7D", "8D", "9D", "10D", "JackD", "QueenD", "KingD" },
            { "AceS", "2S", "3S", "4S", "5S", "6S", "7S", "8S", "9S", "10S", "JackS", "QueenS", "KingS" },
            { "AceC", "2C", "3C", "4C", "5C", "6C", "7C", "8C", "9C", "10C", "JackC", "QueenC", "KingC" }};



Aucun commentaire:

Enregistrer un commentaire