Android Build a Simple Android App with Java Basic Android Programming Generating a Random Number


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
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!