public class RandomUtil { private static final Logger log= LoggerFactory.getLogger(RandomUtil.class); public static int getRandomValue(int min,int max){ Random random=new Random(); int randNumber =random.nextInt(max - min + 1) + min; return randNumber; } }