title: Generate random number and find minimum/maximum as Java Class variables
body: <p>I'm a complete Java newbie. I'm working on classes and methods. I'm trying to create a class variable that stores the minimum value for a random number generator. </p>
  
  <p>It has to be a <strong>class</strong> variable instead of being a variable in a method. Any ideas? I thought to use the <code>Math.random()</code> generator. Something like:</p>
  
  <pre><code>int ranNum = Math.random();
  </code></pre>
  
  <p>This will give me a random number but how would I find the minimum (or maximum) this way?</p>