字體:小 中 大 |
|
|
|
| 2011/03/17 16:22:32瀏覽555|回應0|推薦0 | |
/** * 以亂數種子取值 * */ public void seed(){ HashSet hs=new HashSet(); Random seed=new Random(System.currentTimeMillis()); int temp=seed.nextInt(10); hs.add(String.valueOf(temp)); while(hs.size()<4){ temp=seed.nextInt(10); hs.add(String.valueOf(temp)); } System.out.println(hs.toString()); } |
|
| ( 休閒生活|網路生活 ) |











