package com.emato.ccnet.util; import java.util.Random; /** * @author Scott Chen * @version 1.0 * 2017-11-07 16:18 */ public class DataUtils { /** * 构建随机数 * @param min * @param max * @return */ public static synchronized int createRandomNumber(int min, int max) { Random random = new Random(); return random.nextInt(max)%(max-min+1) + min; } }