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 Build a Simple Android App with Java Basic Android Programming Generating a Random Number

Random

Hello, i dont know why the variable n get error when i put like the same at the example i mean in the example is like n:3 but to me show an error, can you explain to me the reason of this?

1 Answer

Ben Deitch
STAFF
Ben Deitch
Treehouse Teacher

Hey Thays!

You want to use '3' instead of 'n:3'. In the newest version of Android Studio (which is currently in Beta), it shows the names of the parameters as you type them. So the 'n:' part is just some fanciness from the IDE; it's not actually part of the parameter.

Hope that helps!

thank you!