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

Android

question 4/4 of random Generator

The last question: Declare a String variable named intAsString. Convert the randomNumber integer to a String value and store it in the intAsString variable. Hint: Use the toString() method of the Integer class.

I can't figure this out. It took me already 3 hours,

please help anyone, thnks in advance

7 Answers

can you post the actual question? I'm not on that track but I'll be happy to help if I can see what you're working with.

thanks!! Now this is what i already have : Random randomGenerator = new Random(); int randomNumber = randomGenerator.nextInt(10); String IntasString = Integer.toString(randomNumber);

and the last question (4/4) from the quiz is: Declare a String variable named intAsString. Convert the randomNumber integer to a String value and store it in the intAsString variable. Hint: Use the toString() method of the Integer class.

I don't now what to do now.

looks to me like you're question is answered here

that is a link to another forum post, I think it answers your question. Let me know if it doesn't. One thing I've started doing is copying and pasting quiz questions into a google search. The treehouse forums usually pop up this way. That works for me as I am often too impatient to wait for someone to reply to my specific forum/question post :)

Thanks man! I'm a beginner with android, so have at the moment trouble with the easy things:) Treehouse is a great way to learn this language! How long are you already member of this community?

Well I don't know ANY Java so that's why I went right to looking for answers from smarter people for you:)

I've been doing self study for a few months, starting with a udacity class on Python and CS basics. I enrolled at a code school here in Portland and got a Treehouse account through them. Since then I basically live on here! I love it. Code School, Coursera, Udacity, and edX are all great too. Many of them offer free class options as an "auditing student". Unbelievable how much free info and how many helpful people are out there!

haha nice! i'm doing the same thing. I bought some android books before, but sometimes there is a moment that you get stuck on something and than your motivations drops directly. This site gives me a big motivation to learn it!