import java.util.Random; public class Dice { public static void main ( String[] args ) { Random r = new Random(); int die1, die2, total; die1 = 1 + r.nextInt(6); die2 = 1 + r.nextInt(6); total = die1 + die2; System.out.println("First die: " + die1 + "\nSecond die: " + die2 + "\nTotal: " + total); } }