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

glenn akens
glenn akens
838 Points

What am I doing wrong on this part and is there a way to move past a point I get stuck at?

error at

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Glenn";
  printf("%s can code in Java!", firstName);

2 Answers

Steven Parker
Steven Parker
174,163 Points

When the instructions say "Call the printf method on the console object ..." they mean instead of just "printf" you should write "console.printf".

Tonnie Fanadez
Tonnie Fanadez
UX Design Techdegree Graduate 22,541 Points

Hi glenn akens, you need to call printf() from the Console Object as explained by Steve Parker

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