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

Java Java Basics Getting Started with Java IO

Dimitri Mikadze
Dimitri Mikadze
1,230 Points

Android development console.redLine

cant answer to this question

Add a variable to store a user’s first name using console.readLine. Make sure the variable is the camel cased representation of "first name".

i'm answering this and its incorrect.

firstName = console.readLine("name");

please help me :)

there is no any tips? or something like that?

2 Answers

Stephen Bone
Stephen Bone
12,359 Points

Hi Dimitri

At a glance the only thing I can see that is missing is you have to tell Java what sort of value is going to be stored in the variable, so in this case a String. As below:

String firstName = console.readLine("> ");

Hope it helps!

Dimitri Mikadze
Dimitri Mikadze
1,230 Points

Yeas Thank you! sorry for bad question :)

Stephen Bone
Stephen Bone
12,359 Points

Not a bad question at all and I'm glad I could help!