运行的时候发现会有首位数字为0
public static String getRandomNumber(int length) { String value = ""; Random random = new Random(); for (int i = 0; i < length; i++) { value += String.valueOf(random.nextInt(10)); } return value; }
运行的时候发现会有首位数字为0
public static String getRandomNumber(int length) { String value = ""; Random random = new Random(); for (int i = 0; i < length; i++) { value += String.valueOf(random.nextInt(10)); } return value; }