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 trialIjeoma Iheke
205 PointsI'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.
// 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
Joseph Yhu
PHP Development Techdegree Graduate 48,638 PointsThe verb
in printf
should be pastTenseVerb
.
Joseph Yhu
PHP Development Techdegree Graduate 48,638 PointsYou have typos for both attempts.
-
printF
for both attempts should beprintf
(note the lower case f). -
Console
for the second attempt should beconsole
.
Ijeoma Iheke
205 PointsIjeoma Iheke
205 PointsThank 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.
Ijeoma Iheke
205 PointsIjeoma Iheke
205 PointsThank 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).