Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Basics Using your New Tools Multiple Format Strings

What did I do wrong here ?

Am I missing something ...

Multiple.java
String name = console.readLine("Enter name  ");
String pastTenseVerb = console.readLine("Write a past tense verb    ");
consolef( "%s is %s" name,pastTenseVerb);

1 Answer

Jeff Wilton
Jeff Wilton
16,646 Points

You third line should use the console.printf method as shown in the video before the challenge. Also the challenge asks for some specific text for the third line as well. The correct one should look like this:

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

But I would encourage you to go back and review the previous video if you are unsure about how the console.printf method works.

Yea I did also add console, turns out it was my browser it accepted in 5th try =)) ...Thanks a lot!

Anubhav Rajput
Anubhav Rajput
313 Points

your third line have error because you you should use the console.printf("%s really %s this coding exercise", name, pastTenseVerb);