import java.util.Random; public class DiceDoubles { public static void main ( String[] args ) { Random r = new Random(); int die1, die2, total; die1 = 0; die2 = 1; while (die1 != die2) { die1 = 1 + r.nextInt(6); die2 = 1 + r.nextInt(6); total = die1 + die2; System.out.println("\nRoll #1: " + die1 + "\nRoll #2: " + die2 + "\nTotal: " + total); } } }