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

I don't know what I am doing

Its saying my dot is wrong how is that
// I have setup a object for you named console
String firstName = "Luke";
console.prinf("%s, firstName");

2 Answers

54,331 Points

Some hints for task 2

  • it is printf not prinf
  • don't enclose variable names in quotes
  • you are to print 'Luke can code in Java!' so you'll need concatenation

Thx for the help man I guess I need to look for the littler things.

Ryan Dsouza
Ryan Dsouza
9,388 Points
// working code
String firstName = "Luke";
console.printf("%s", firstName);