The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Dice Game! PLEASE HELP!

I need to make a game where it simulates 2 dice being rolled. The instructions are: in this game, two dices are rolled. You win the game if the sum of two dices is "7", otherwise, you'll lose the game. The game should be in a loop so that the user can keep playing until he/she wants to quit. Here is what it is like: "Would you like to play the game? (y/n)" user imputs y. "1st dice: 6, 2nd dice: 2" println "sorry you lost." "Continue to play the game? (y/n)" user imputs y. "1st dice: 5, 2nd dice: 1" println "Sorry, you lost." "Continue to play the game? (y/n)"