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

Java Java Basics Getting Started with Java Strings, Variables, and Formatting

What does "make sure you add the `%s` formatter" mean?

My Code is : // I have setup a java.io.Console object for you named console String firstName = "Khanh"; console.printf(" %s can code in Java!, firstName");

The Question is: Now replace <YOUR NAME> in the console.printf expression with the firstName variable using the string formatter.

How can I do this?

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Khanh";
console.printf(" #s  can code in Java!, firstName");

I think your problem is that you have some syntax errors in the console.printf line. I believe it should be:

console.printf(" %s can code in Java!", firstName);

%s (not #s) says that you will be sending in a string (in this case firstName) to fill that spot.

Also, the closing quotes (") go at the end of the string (after Java!) instead of after the variable name (firstName).

Hopefully, that makes sense and works for you. Good luck!