need a help in this dice program, having problem with looping

This is a client program

here i need to ask user if he/she wants to play the dice roller ..if yes then start gaem.

After one game i have to ask weather he/she wants to play again.

mport java.util.Scanner;

publicclass DiceTester

{

publicstaticvoid main(String [] args)

{

Dice dice1 =new Dice();

Dice dice2 =new Dice();

dice1.roll();

dice1.roll();

int x = dice1.getface();

int y = dice2.getface();

char yes;

System.out.println (" Do you want to play a rolling game?");

System.out.println ("\nIf yes then press \"Y\" or \"y\" > " );

Scanner scan =new Scanner (System.in);

yes = scan.next().charAt(0);

if (yes =='y'|| yes =='Y')

{

System.out.println("The result of the first dice rolled is > " +x);

System.out.println("The result of the second dice rolled is > "+y);

int Sum = x+y;

System.out.println("The sum of two dice rolled is " +Sum);

}

else

{

System .out.println("Good buy");

}

}

}

[1994 byte] By [nosuguya] at [2007-10-2 5:48:53]
# 1
Hi,Open your textbook and read about while and do .. whileKaj
kajbja at 2007-7-16 1:58:23 > top of Java-index,Java Essentials,New To Java...
# 2
http://java.sun.com/docs/books/tutorial/java/nutsandbolts/flow.html
targaryena at 2007-7-16 1:58:23 > top of Java-index,Java Essentials,New To Java...