Math.random機能をテストしているという簡単な質問があります。(int) (Math.random()*6)+1
100個のボックスのそれぞれの結果を配列に割り当てて値を格納しようとしています。しかし、それがステートメントではないというエラーが発生します。誰かがおそらくいくつかのガイダンスを提供できますか?
public shoes(int[] pairs)
{
System.out.println("We will roll go through the boxes 100 times and store the input for the variables");
for(int i=0; i < 100; i++)
{
//("Random Number ["+ (i+1) + "] : " + (int)(Math.random()*6));
int boxCount[i] = (int) (Math.random()*6) + 1;
}
}