示例#1
0
 /**
  * 随机生成车牌
  *
  * @return 车牌
  */
 public static String nextPlate() {
   String[] prefix = {"粤", "湘", "桂", "闽", "浙", "皖", "黑", "辽", "吉", "京", "津", "陕", "琼"};
   return Random.nextString(prefix)
       + Random.nextCapitalLetter()
       + "-"
       + Random.nextNumberString("6");
 }
示例#2
0
 public static void main(String[] args) {
   System.err.println(Random.nextLetter());
   System.err.println(nextNumber());
   System.err.println(nextNumber(0, 5));
 }