public static void main(String[] args) { Random r = new Random(); int i = 0; while(true) { i = r.nextInt(9999999); if(i > 999999) { break; } } System.out.println(i);}
本文共 250 字,大约阅读时间需要 1 分钟。
public static void main(String[] args) { Random r = new Random(); int i = 0; while(true) { i = r.nextInt(9999999); if(i > 999999) { break; } } System.out.println(i);}
转载于:https://my.oschina.net/tianhandigeng/blog/102490