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 trialbong zi jiang
616 Pointshelp help
can give me answer? so i easy to understand
Random randomGenerator;
1 Answer
stefano barzaghi
6,636 PointsHi Bong!
As it is the "randomGenerator" is not initialized, but just declared as a variable. To initialize it, you need the keyword "new" as the hint in the exercise suggest, that is:
Random randomGenerator = new Random();
Cheers, Stefano