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

I'm stuck on an IO Challenge on Java Basics.

I'm trying to move onto the next question in my Challenge but am stuck on stupid on the first question.

String firstName = console.readLine = ("What is your name?  ");

Added code tags.

2 Answers

In order to call the readLine method you want to place the set of parentheses (containing the one argument) right to the name:

String firstName = console.readLine("What's your name? ");

The = operator is used for assignment so no need to use it to call methods.

I just tried it. Success! Thank you very much Mr. Dan Johnson!