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

I cant past this task , where can i check a hint or the answer?

String pastTenseVerb = console.readLine("Enter your Past verb "); console.printf("is %s ", pastTenseVerb);

Multiple.java
// I've imported java.io.Console for you.  It is stored in a variable called console for you.

3 Answers

Hey Oscar,

It looks like you're currently only outputting one of the variables, pastTenseVerb. This challenge requires you to print both the name and pastTenseVerb variables.

The print statement should look like: "(name) really (pastTenseVerb) this coding exercise."

Take a look at the below example. Notice how I am using %s multiple times? See if you can follow this structure in your challenge. If you get stuck, I can post the answer.

// Gather first input
String name = console.readLine("Name: ");
// Gather second input
String college = console.readLine("College: ");
// Gather third input
String graduationDate = console.readLine("Graduation Date: ");
// Print message
console.printf("%s should graduate from %s in %s.", name, college, graduationDate);

thanks for the attention , i pass with this code

String name = console.readLine("Enter your name: "); String pastTenseVerb = console.readLine("Enter a verb in a past tense: "); console.printf("%s was %s", name, pastTenseVerb);

Perfect.