I'm checking the frequency of the dice totals after 36 million rolls. I planned to make an arrayList and use it as a tally system when any of the 11 results came up. How would I add 1 to one of the items in the list?
int die1, die2, dicetotal;
ArrayList<Integer> results = new ArrayList<Integer>();
results.add(0); //for the 11th
for(int i = 0; i < 36000000; i++){
die1 = (int)(Math.random() * 6) + 1
die2 = (int)(Math.random() * 6) + 1
dicetotal = die1 + die2;
Switch (dicetotal){
case 2: results.set(0, CURRENT + 1);
...
...
...
}
int[]?