随机数6位(强制六位,包括000000) int number = rnd.nextInt(999999);//生成6位随机数0-999999 String.format("%06d", number);//强制六位字符串