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 trial
Ian - PortalPacific
Courses Plus Student 3,518 PointsIm stuck... I re-watched the video and cant find the answer?
I am stuck on the last question! Of course lol!
On this quiz: http://teamtreehouse.com/library/using-the-random-class
I dont understand what its asking... I have taken it in every possibility I could think of and now i'm just extra confused. Hints? :3 lol
Can anyone "dumb down" the question with an over explanation?
1 Answer
Kristen Law
16,244 PointsIt's basically asking you to convert an int to a String. In the video at around 3:10, Ben shows one example of doing this, by "mooshing" an int variable and a blank String "" (using the + operator).
See below:
String intAsString = randomNumber + "";
Ian - PortalPacific
Courses Plus Student 3,518 PointsIan - PortalPacific
Courses Plus Student 3,518 PointsThank you so much! I was putting randomGenerator instead of randomNumber for some reason thinking it wanted me to replace randomNumber completely.
Ty again!