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

Yacine Freifer
Yacine Freifer
3,084 Points

Java string variable not printing, can you spot the error?

String firstName=("Yacine"); printf("%s can code in Java!",firstName);

It should print out Yacine can code in Java!

But there are errors apparently.

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

String firstName= ("Yacine");

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

1 Answer

Yacine Freifer
Yacine Freifer
3,084 Points

ok , i was missing console.printf

solved by me, i am so cool hehehe. hehe..