在线名词解释大全 - 单选题 - 详细

jx14.要产生[20,999]之间的随机整数可以使用以下哪个表达式?

A
(int)(20+Math.random()*97)
B
20+(int)(Math.random()*980)
C
(int)Math.random()*999
D
20+(int)Math.random()*980
正确答案:
相关推荐
扫描二维码
关注公众平台