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

Bolatito Seriki
Bolatito Seriki
1,170 Points

Call the printf method on the console object and make it write out "<YOUR NAME> can code in Java!"

I did it the right way and it keeps telling me to check the spelling
String firstName = "Bolatito";
console.printf("Hello my name is %s\n", firstName);
console.printf("I'm %s\n", firstName);

1 Answer

Steven Parker
Steven Parker
203,748 Points

The other part of the hint is "Make sure it is printing out what the instructions are asking for."

The instructions ask you to show this:

<YOUR NAME> can code in Java!

But this code outputs this instead:

Hello my name is Bolatito
I'm Bolatito

That's a bit different! :see_no_evil: