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 trialFarhan Khan
17,530 Pointswhy is the printf giving me an error?
printf giving me syntax error?
String name = console.readLine("please enter your name: ");
String pastTenseVerb = console.readLine("please enter a verb: ");
console.printf("%s really %s this coding exercise", name,pastTensVerb);
1 Answer
Michael Hess
24,512 PointsHi Farhan,
Everything is looking good, except it looks like there is a spelling error in the printf statement:
// pastTensVerb should be pastTenseVerb
console.printf("%s really %s this coding exercise", name,pastTensVerb);
Try this:
console.printf("%s really %s this coding exercise", name,pastTenseVerb);
Hope this helps!