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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Sean Gwall](https://secure.gravatar.com/avatar/910cfa4f7fa9622070f39f09f9c979be?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sean Gwall
984 PointsHow to i make my name appear in the console?
Im trying to get my name to appear in the console for the code challenge but it is not right.
String firstName = "Sean";
console.printf("Sean");
4 Answers
![William Juste](https://secure.gravatar.com/avatar/7ecfbdbc68f94237637a0ca4f3a254e5?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
William Juste
7,822 PointsThe code challenge ask for you to "Call the printf method on the console object and make it write out "<YOUR NAME> can code in Java!""
so the first line should be String firstName = "Will";
and the second console.printf("%s, can code in Java!", firstName);
good luck
![Nicolas Hampton](https://uploads.teamtreehouse.com/production/profile-photos/2932942/micro_Screen_Shot_2019-02-01_at_3.19.46_PM.jpg)
Nicolas Hampton
44,638 PointsThey want you to use the variable.
![Sean Gwall](https://secure.gravatar.com/avatar/910cfa4f7fa9622070f39f09f9c979be?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sean Gwall
984 PointsI updated my code but still not working. Code:
String firstName = "Sean"; console.printf("%s", firstName);
![Nicolas Hampton](https://uploads.teamtreehouse.com/production/profile-photos/2932942/micro_Screen_Shot_2019-02-01_at_3.19.46_PM.jpg)
Nicolas Hampton
44,638 PointsDon't put the quotation mark around the variable.
console.printf("Hello my name is %s", firstName);
The program will take whatever you made firstName be and put it inside the quotation marks where you put the s. You were close, you're going the get the hang of this. :) Happy coding!
Nicolas
![Sean Gwall](https://secure.gravatar.com/avatar/910cfa4f7fa9622070f39f09f9c979be?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sean Gwall
984 PointsStill no luck
String firstName = "Sean";
console.printf("Hello my name is %s", firstName);
![Craig Dennis](https://secure.gravatar.com/avatar/950c867932cc1483d8aa3dad92c4cb81?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Craig Dennis
Treehouse TeacherFollow the instructions carefully ;) Does that say what is being requested?
![Nicolas Hampton](https://uploads.teamtreehouse.com/production/profile-photos/2932942/micro_Screen_Shot_2019-02-01_at_3.19.46_PM.jpg)
Nicolas Hampton
44,638 Pointslol, smacks head
![Jason Carr](https://secure.gravatar.com/avatar/f9819856727923f7806793c8b5108cda?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Jason Carr
5,495 PointsHi, Sean I had the same problem but once i came to the forum i got the answer just do what WIlliam is telling you. It's not Hello my name is %s rather IT'S ("%s, can code in Java!", firstName);