指定范围的随机数

/**
     * 指定范围的随机数
     */
    public static int getRandom(int min, int max) {
        Random random = new Random();
        return random.nextInt(max) % (max - min + 1) + min;
    }
原文地址:https://www.cnblogs.com/H-BolinBlog/p/9738063.html