I have a fundamental question about how arrays store data and how to properly put data into an array.
THIS PART ANSWERED
In this code the method spinWheel() is just calling an integer from 0-36.
for(cntr=0; cntr<99; cntr++)
{
spunNum=spinWheel();
all99Spun[0]=spunNum;
}
How do I adjust the array all99Spun[] so that the next time the loop executes it would put spunNum into all99Spun[1] and so forth?
Another question I have about arrays is how to check equality between 1 integer and all the integers stored in an array.
for example I have an array that stores all the red numbers of a roulette wheel.
int redNumbers[] = new int[] {1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36};
How would I check the equality of a number stored in the all99Spun array with that of the integers in the array of rednumbers?
ArrayList<Integer> red = new ArrayList<Integer>();to store your red numbers and then callif(red.contains(some_integer))