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

Benard Nyambok
Benard Nyambok
284 Points

Argument spelling

what am i doing wrong here?

Name.java
String firstName="larry";// I have setup a java.io.Console object for you named console
console.printf("YOUR NAME");

3 Answers

Rick Gleitz
Rick Gleitz
35,037 Points

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

So the message part inside the parens needs to look like: "<YOUR NAME> can code in Java!"

Just copy and paste it right in there.

Next, replace the <Your Name> part with %s Then after the string, put a comma and the variable firstName

Don't forget the semi-colon after the closing paren!

Hope this helps!

Benard Nyambok
Benard Nyambok
284 Points

thank you rick i figured it out