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
Hussain Shaikh
404 PointsI'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? ");
2 Answers
Dan Johnson
40,533 PointsIn 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.
Hussain Shaikh
404 PointsI just tried it. Success! Thank you very much Mr. Dan Johnson!
Dan Johnson
40,533 PointsDan Johnson
40,533 PointsAdded code tags.