Java生成随机数

1、生成double

Convert.toDouble(Math.round(Math.random() * 10))

2、生成1-10整数
Convert.toInt(Math.round(Math.random() * 10))

posted on 2020-04-03 14:02  七七2020  阅读(528)  评论(0编辑  收藏  举报

导航