Java Java Basics Using your New Tools Multiple Format Strings

ofek Lalkin
ofek Lalkin
728 Points

what am i doing wrong ?

what is wrong i have tried so many things

Multiple.java
// I've imported java.io.Console for you.  It is stored in a variable called console for you.
String name=console.readLine("ofek");
String pastTenseVerb=console.readLine("enjoyed");
console.printf("%s really %s this coding exercise,Name,PastTenseVerb" );

1 Answer

Long Nguyen
Long Nguyen
5,968 Points

Java is case-sensitive. Name and name are two different variables. Since you used name instead of Name, you should use name in the printf statement (also true for pastTenseVerb variable). Also the quotes should end before the first variable in the printf statement.

console.printf("%s really %s this coding exercise", name, pastTenseVerb);