Set seed on Math.random()

Posted by Kevin on Stack Overflow See other posts from Stack Overflow or by Kevin
Published on 2010-05-14T18:42:53Z Indexed on 2010/05/14 18:44 UTC
Read the original article Hit count: 174

Hi - I need to write some junit tests on java code that calls Math.random(). I know that I can set the seed if I was instantiating my own Random object to produce repeatable results. Is there a way to do this also for Math.random() ?

© Stack Overflow or respective owner

Related posts about java

Related posts about random-number-generator