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

luke Burton
luke Burton
1,508 Points

I don't know what I am doing

Its saying my dot is wrong how is that

Name.java
// I have setup a java.io.Console object for you named console
String firstName = "Luke";
console.prinf("%s, firstName");

2 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 50,936 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
luke Burton
luke Burton
1,508 Points

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

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