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 trialI7x Coder
Courses Plus Student 2,202 PointsAdd a variable to store a user’s last name using console.readLine. Make sure the variable is the camel cased representa
Add a variable to store a user’s first name using console.readLine. Make sure the variable is the camel cased representation of "last name".
String lastName = console.readLine("Enter your last name.");
2 Answers
Steve Hunter
57,712 PointsYou added lastName
when it is looking for firstName
. The next task is to do this for the last name.
Steve.
Bryan Tidwell
3,473 PointsCode looks perfect to me, too. Are you getting an error about task one no longer passing? That's the only thing I can think of and the problem I ran into on this challenge, too.
If that's the problem, just make sure you type in the lastName variable on the next line instead of over the top of your firstName variable.
I7x Coder
Courses Plus Student 2,202 PointsI7x Coder
Courses Plus Student 2,202 Pointsno i want lastname plz
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsYour code looks fine, then. What error are you getting?