public class DiceApp
{//时代Java - N o w J a v a . c o m 提 供
public static void main(String[] args)
{
int roll;
String msg = "Here are 100 random rolls of the dice:";
System.out.println(msg);
for (int i=0; i<100; i++)
{
roll = randomInt(1, 6);
System.out.print(roll + " ");
}
System.out.println();
}
public static int randomInt(int low, int high)
{
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。