How to make a math.random into a for loop
<p>in short form, i created a math.random that will choose a random number, then another variable later will use that number. After that random is used math.random will choose another number, and this would go on forever. I would think to use a for loop with the math.random making it look something like this:</p>

<pre><code>for (int i = 0; i &lt;100; i++) {
    int mRandom = (int) (Math.random() * 21 + 15);
}
</code></pre>

<p>then later I use the number to change the speed and angle of the sprite i created (this entire code is used to create the sprite so I don't have a problem with the sprite being used)</p>

<pre><code>   for (int i = mIDontKnowTimer; i == mRandom; i++) {
</code></pre>

<p>here I have a timer that i already created, and when that timer is equal to the number generated by mrandom the speed and angle changes</p>

<pre><code>        int pSpeed = (int) (Math.random() * 3 + 3);
        int pAngle = (int) (Math.random() * 359);

        mXSpeed = pSpeed * Math.cos(pAngle);
        mYSpeed = pSpeed * Math.sin(pAngle);
    }
</code></pre>

<p>Im confused as to how to make the mRandom a loop, because it is saying the first line has an illegal start of type and that it can't find "i" in the code</p>