(Java) How do you generate a random integer between 1 to 4 using SecureRandom : <p>An assignment I'm working on right now needs to generate a random number from 1 to 4 using SecureRandom that will be used for a switch statement. Cases have to start from 1 so I can't just use</p>

<pre><code>SecureRandom rand = new SecureRandom();
int a;
a = rand.nextInt(4);
</code></pre>

<p>right?
I have to use SecureRandom to generate the integer as well.</p>
