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 trialNicholas Cawthon-Church
535 Pointstried to fix again
still is saying Ive done it wrong
// I have imported java.io.Console for you. It is a variable called console.
String firstName = console.readLine("nicholas");
String lastName = console.readLine("what is your last name?\n");
console.printf("%s",firstName);
2 Answers
Ken Alger
Treehouse TeacherNicholas;
The output that it is wanting is "First name: nicholas", given your code assigning the firstName
variable to nicholas
.
Post back if you are still stuck.
Happy coding,
Ken
Nicholas Cawthon-Church
535 Pointsoh wow its just that in the question they gave I thought they wanted me to print the , firstName); -Thank you very much.
Nicholas Cawthon-Church
535 PointsNicholas Cawthon-Church
535 PointsIt's saying that the last line is wrong [console.printf("%s", firstName);]
Ken Alger
Treehouse TeacherKen Alger
Treehouse TeacherYes. It needs to print out "First name: nicholas", not just "nicholas". The code for that would be:
console.printf("First name: %s", firstName);
Make sense?
Ken