title: What is O(n) for java.util.Random.next(n)
body: <p>I want to know whether <code>java.util.Random.next(n)</code> scales linearly with n or is a constant? Could someone help me with this or show me how to go about determining the complexity?</p>