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 trialJacob Olsen
94 Pointsdone everything i have learned dont know how to fix it
need help
// I have imported java.io.Console for you. It is a variable called console.
String FirstName = console.redLine("whats my name? ");
console.printf("%s is learning to code\n", FirstName);
1 Answer
Jennifer Nordell
Treehouse TeacherHi there! You're doing fine, but there's a couple of things going on here. First, the challenge does not ask you to print anything to the console at this point, so you can safely remove that line. Secondly, the name of your variable doesn't exactly match the instructions. The instructions ask for a variable named firstName
, but your variable is named FirstName
. Remember, that camel-case unless specified as upper camel case should begin with a lower case letter.
The reason you're getting a compiler error is because you've misspelled readLine
and instead typed redLine
.
The line you're looking for is:
String firstName = console.readLine("whats my name? ");
Hope this helps!
Jacob Olsen
94 PointsJacob Olsen
94 Pointsthank you so much