I need to generate 8 random numbers: Four being "1"s and the other four being "2"s and then assign them to an array. I already have the code to generate random numbers:
1 + (int)(Math.random() * ((2 - 1) + 1))
What I need to do is to have four "1"s and four "2"s in a random order.