import java.util.Random;
/**
* Petals Around the Rose Game
*
* @author
* @version October 7, 2012
*/
public class PetalsGame
{
// get random number
Random diceRoller = new Random();
for (int i = 0; i < 5; i++)
{
int roll = diceRoller.nextInt(6) + 1;
System.out.println(roll);
}
}
Petals around the rose random number
Page 1 of 11 Replies - 179 Views - Last Post: 07 October 2012 - 02:23 PM
#1
Petals around the rose random number
Posted 07 October 2012 - 02:20 PM
the error says illegal start of type and ive looked at a ton of other random number generators and i just cant seem to understand them. any kind of help would be glorious thank you.
Replies To: Petals around the rose random number
#2
Re: Petals around the rose random number
Posted 07 October 2012 - 02:23 PM
Generally, with some exceptions that probably don't apply in this case, the statements between lines 13 and 17, inclusive, should be in a method.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|