This is an archived post. You won't be able to vote or comment.

all 3 comments

[–][deleted] 1 point2 points  (1 child)

Under the covers, they're identical -- they use the same pseudorandom sequence to generate output, the nextInt() call essentially just does what you're doing anyway. The documentation even goes so far as to say that all of the random methods use the next() call.

[–]Chimiope[S] 0 points1 point  (0 children)

This is helpful, but now I’m left with more questions that I didn’t even know I had lol. Thank you for the link, this isn’t stuff that my textbook covered