453203489 发表于 2015-8-4 23:50
哥们, 你贴错代码了。
预言者 发表于 2015-8-4 23:52
看你下面代码不是随机数的,个人认为,需要用到math.random。就是math里面的产生随机数的。跟sum求和差不多 ...
王训印 发表于 2015-8-5 19:03
兄弟姐妹们,不好意思贴错代码了
思路:用hashset存放随机生成的数据就不会有重复
...
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |