Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- import java.util.List;
- import java.util.Random;
- public class roulette {
- static Random rand;
- static int random;
- static String[] red = {"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"};
- static List<String> redNums = Arrays.asList(red);
- public static void main(String[] args) {
- random = rand.nextInt(41);
- if (redNums.contains(rand)){
- System.out.println("You have a red number");
- }else{
- System.out.println("You have a black number");
- }
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment