日期:2014-05-20  浏览次数:20753 次

跪求随机数生成
我要求0-480 之间个位数是0或5的随机数 求答案

------解决方案--------------------
取值区间[0,480):
int n=5*new Random().nextInt(96);
取值区间[0,480]:
int n=5*new Random().nextInt(97);