String d1 = Integer.toString((int)((Math.random()*6)+1)); String d2 = Integer.toString((int)((Math.random()*6)+1)); out.println("<html><body>" + "<h1 align=center>HF\'s Chap 2 Dice Roller</h1>" + "<p>" + d12 + " and " + d2 " " were rolled" + "</body> </html>"); } }
import javax.servlet.*; import javax.servlet.http.*; import java.io.*;