import java.security.SecureRandom; // program uses class SecureRandom
public class Main
{/**来 自 时代Java - nowjava.com**/
public static void main(String[] args)
{
// randomNumbers object will produce secure random numbers
SecureRandom randomNumbers = new SecureRandom();
// loop 20 times
for (int counter = 1; counter <= 20; counter++)
{
// pick random integer from 1 to 6
int face = 1 + randomNumbers.nextInt(6);
/* 来 自 时 代 J a v a 公 众 号 - nowjava.com*/
System.out.printf("%d ", face); // display generated value
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。