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

Bryan Bee
Bryan Bee
477 Points

need help with printf

// I have setup a java.io.Console object for you named console String firstName = "Bryan"; console.printf("%s", firstName); It keeps saying to check spelling but everything looks correct to me.

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Bryan";
console.printf("%s", firstName);

1 Answer

Heidi Fryzell
seal-mask
MOD
.a{fill-rule:evenodd;}techdegree seal-36
Heidi Fryzell
Front End Web Development Treehouse Moderator 20,504 Points

Hi Bryan,

You are are really close. I think you are just missing some details in the directions.

The directions say to print out: "<YOUR NAME> can code in Java!"

So there is more to the output than just the firstName variable. You need to add some more text inside the quotes after the %s.

I hope that is a good enough hint. If not let me know and I can give you another. Good luck!

Heidi

Bryan Bee
Bryan Bee
477 Points

It did thank you!