docs中說返回值是從0到i,不夠準(zhǔn)確。
返回值應(yīng)該是 >=0 , <i,就是說永遠也不會返回i。
返回值應(yīng)該是 >=0 , <i,就是說永遠也不會返回i。
黑靈客棧
黑靈的沒啥技術(shù)含量的技術(shù)博客! -> http://zjumty.iteye.com
|
|
BlogJava |
首頁 |
發(fā)新隨筆 |
發(fā)新文章 |
聯(lián)系 |
聚合![]() |
隨筆:204 文章:2 評論:243 引用:0 |
|
|
該值大于等于0而小于i,但取不到i。
個人感覺你理解有誤,而不是doc有誤
我添加“不編不知道,一編嚇一跳”這個分類的用意就是要記錄下一些docs沒有明確指出并容易引起錯誤的地方。
不要沒事抬杠!!!!!!
否則 kill you!
int nextInt(int n)
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.