首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

随机取两个数目字时间的任意一个数字

2012-09-10 
随机取两个数字时间的任意一个数字随机取两个数字之间的任意一个数字,代码如下:public class Test { publi

随机取两个数字时间的任意一个数字
随机取两个数字之间的任意一个数字,代码如下:

public class Test {

public static void main(String[] args) {

long max = 1321672754175l;
long min = 1321672694175l;
Random random = new Random();
long s = Math.round(Math.random()*(max-min)+min);
System.out.println(s);

    }

}

热点排行