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

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

What I'm I doing Wrong ?
String firstName = "Alex";

console.printf("%s", firstName);

2 Answers

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 87,013 Points

You just need the rest of the string in your code. You need to build up the following String.

<YOUR NAME> can code in Java!

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