variable name unresolved
<p>I'm following the Stanford intro to java course and started trying to run a few of the examples they give in Eclipse, but running into a problem.</p>

<p>When I assign the value of rgen to dieRoll, it's telling me "regn cannot be resolved". When I'm naming the RandomGenerator as "rgen" it's saying "The value of the field DiceRoll.regn is not used"</p>

<p>Can anyone tell me why this happening, and how I can correct it so I can run this?! Thanks</p>

<pre><code>import acm.program.*;
import acm.util.*;

public class DiceRoll extends ConsoleProgram {
public void run() {
    int dieRoll = rgen.nextInt(1,6);
    println("You rolled " + dieRoll);
}

/*Private instance variables */
private RandomGenerator regn =
        RandomGenerator.getInstance();
}
</code></pre>
