Store Random numbers into Array

I need to generate a random number between 1 and 6 to simulate rolling each dice. Keeping track of the result of each roll using an array that is indexed by the sum of the roll of the two dice. I have to output my result in a table which shows each value (ie. 2 – 12) and the number of times that value was rolled.

So this is my code so far to generate random numbers.. now i basically dont know how do i store those numbers generated into array.. If anybody can help.. It would be great..!

Thanks in advance..

Here is the code:

Code:

`package w2_2;`

import javax.swing.JOptionPane;

import javax.swing.JTextArea;

import java.util.Random;

public class w2_2 {

public static void main(String args[]){

Random dice = new Random();

int number;

for (int counter=1; counter<=10; counter++){

number = 2+ dice.nextInt(11);

int store[];

store = new int[10];

store[counter]=number;

}

System.out.println(store[2]);

}

}