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

Peter Stanbury
Peter Stanbury
435 Points

I get the following error message: "Make sure that you use the 'firstName' variable as the second argument".

Can anyone help with this? Thanks

Name.java
// I have setup a java.io.Console object for you named console

String firstName = "<YOUR NAME>";

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

1 Answer

Steven Parker
Steven Parker
195,375 Points

You're really close! But the string doesn't need a newline ("\n") in it.

Luckily it doesn't seem to mind you using the placeholder string as the name, but typically you would put an actual name in that variable. :wink: