package com.inmind.random02; import java.util.Random; /* 获取10个55~66之间的值,(包含55和66) random.nextInt(10);//获取0~9的随机数 */ public class Demo06 { public static void main(String[] args) { Random random = new Random(); for (int i = 0; i < 1000; i++) { int result = random.nextInt(12)+55;//0~9: 55~66 -55 -->0~11--->12 System.out.println(result); } } }