“Random.Choice in Java” Kode Jawaban

Random.Choice in Java

String[] available_cards = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Queen", "King", "Jack", "Ace"};  
java.util.Random random = new java.util.Random();
int random_computer_card = random.nextInt(available_cards.length);
System.out.println(available_cards[random_computer_card]);
Lonely Lyrebird

Random.Choice in Java


String[] available_cards = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Queen", "King", "Jack", "Ace"};  
java.util.Random random = new java.util.Random();
int random_computer_card = random.nextInt(available_cards.length);
System.out.println(available_cards[random_computer_card]);

Clever Cobra

Jawaban yang mirip dengan “Random.Choice in Java”

Pertanyaan yang mirip dengan “Random.Choice in Java”

Lebih banyak jawaban terkait untuk “Random.Choice in Java” di Java

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya