摘要:
1 3 import java.util.Random; 4 5 public class RandomTest { 6 public static void main(String[] args) { 7 int max=20; 8 int min=10; 9 Random random = new Random();10 11 int s = random.nextInt(max)%(max-min+1) + min;12 System.out.println(s);13 }14 } 1 ... 阅读全文