if (bet == 'a'|| bet == 's') { if (bet == 'a') { System.out.println("If you bet a number leave a space between each number"); s=scan2.toString(); String arrayString[] = s.split("\\s+"); String[] items = s.split("\\s+"); int[] results = new int[items.length]; for (int i = 0; i < items.length; i++) { try { results[i] = Integer.parseInt(items[i]); } catch (NumberFormatException nfe) {}; amountholder= howmuch* arrayString.length; } if (amountholder>iamount) { System.out.println("You bet to much"); } else { int numholder1 = rand.nextInt(odds) + 1; int[] array = results; int value =numholder; int index = Arrays.asList(array,betnum).indexOf(numholder); System.out.println("You got" + numholder1); if(index>0); { wins++; newcash=iamount +(howmuch* (odds-1)); System.out.println("Congratz you Won" + " "+ (howmuch* (odds-1))); } if(index<0) { newcash= (iamount-howmuch); lose++; System.out.println("Sorry you lost" +" " + howmuch); } } System.out.println("You now have "+ newcash + "$"); System.out.println("Type: b to bet"); System.out.println("Type q to quit"); userinput = scan1.nextLine().charAt(0);