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'm trying to complete Task 3 of Multiple.java challenge, and I'm getting errors and not sure what it's asking

This is what I wrote for the answer, and someone help figure out what I'm doing wrong? console.printf("%s really %s", name, verb);

Also, my workshop template is giving me errors on both of the exercises. It didn't perform and of the tasks, even though I had the same thing the instructor had on his worksheet. I just keep getting error messages, can someone please help.

Multiple.java
// I've imported java.io.Console for you.  It is stored in a variable called console for you.
String name =console.readLine("Enter your name:  ");
String pastTenseVerb = console.readLine("Enter your name:  ");
console.printf("%s really %s", name, verb);

2 Answers

The verb in printf should be pastTenseVerb.

Thank you Joseph for your response.

I did try that before and I just tried it again, and below is the error that I'm getting, and suggestions? I also changed question 2 to pastTenseVerb, which was correct.

console.printF("%s really %s", name, pastTenseVerb); error msg: JavaTester.java:118: error: cannot find symbol Console.printF("%s really %s", name, pastTenseVerb); ^ symbol: variable Console location: class JavaTester 1 error

Thank you in advance for your help.

Thank you so much, that did it.

Per chance do you know what I can do to get my tasks on Workspace to perform. I always get error messages when I try to execute the tasks (on both workspaces).

You have typos for both attempts.

  1. printF for both attempts should be printf (note the lower case f).
  2. Console for the second attempt should be console.