Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialerickrusznis
1,245 PointsRandom_randomGenerator doesnt run due to errors.
I have the following code: Random_randomGenerator = new Random(); int randomNumber = randomGenerator.nextInt(3); fact = randomNumber + "";
But it is highlighted red and when trying to run app, it gives me these errors: error: cannot find symbol variable Random_randomGenerator error: cannot find symbol variable randomGenerator execution failed for task: 'app:compleDebugJavaWithJavac'.
I do have the import set on the page, import java.util.Random;
2 Answers
Kourosh Raeen
23,733 PointsThe problem is the underscore. The line of code should look like this:
Random randomGenerator = new Random();
erickrusznis
1,245 PointsYou sir...are awesome.