package com.philisense.www.utils;

import java.util.Random;

public class RandUtil {

    private static final int NUM = 6;

    public static String getRandNum() {
        String randNum = new Random().nextInt(1000000)+"";
        // 如果生成的不是6位数随机数则返回该方法继续生成
        if (randNum.length() != NUM) {
            return getRandNum();
        }
        return randNum;
    }
}
