This is your homework. You would have already taught otherwise it would not have been given to you as homework. If your have doubts, you should consult your teacher first, or discuss with your coursemates. Nevertheless, I will answer your 3 questions.
Quote:
For 'random() * 6 + 1', I am not sure why the random number has to times 6 and plus 1?
The reason is the Math.random() returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0. So as it is, it will never return 6, you have to add 1; and it may return 0.0, which is not a valid number, so again add 1. Got it?
Quote:
Is 'number6++' to add up all the random dice thrown landed in 6?
number6 is to store the number of time 6 has been thrown, 'number6++' is the same as 'number6 = number6 + 1'.
Quote:
Is i++ to accumulate all the 'number6' up to 3000?
No, i acts as a counter to keep track of the number of time the dice has been throws.
You should proceed to do your homework yourself. You may refer to some online links for further help, such as
Java Tutorial[
^]