Math.random()是令系统随机选取大于等于0.0 且小于1.0 的伪随机double 值,是Java语言常用代码。例如:double a=Math.random()*(3-1)+1,设置一个随机1到3的变量。
確定! 回上一頁