Java开发网 |
注册 |
登录 |
帮助 |
搜索 |
排行榜 |
发帖统计
|
您没有登录 |
» Java开发网 » Java SE 综合讨论区
打印话题 寄给朋友 订阅主题 |
作者 | 请教产生随机数的范围? |
soskitty
发贴: 9 积分: 0 |
于 2005-05-31 21:18
书上说 Math.random()方法产生“介于”0与1之间的随机数,请问包不包括1? 拿例子来说就是:(int)(Math.random()*20)有没有可能产生20? 顺便问一下我想自己测试的话该怎么测试? 谢谢! |
话题树型展开 |
人气 | 标题 | 作者 | 字数 | 发贴时间 |
4180 | 请教产生随机数的范围? | soskitty | 117 | 2005-05-31 21:18 |
3082 | Re:请教产生随机数的范围? | why | 198 | 2005-05-31 21:35 |
3177 | Re:请教产生随机数的范围? | soskitty | 6 | 2005-06-01 09:32 |
3487 | Re:请教产生随机数的范围? | yinpeng263 | 75 | 2005-06-08 03:59 |
已读帖子 新的帖子 被删除的帖子 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |