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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Laura Mckay](https://secure.gravatar.com/avatar/eda3625450dafee21376455c8d354880?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Laura Mckay
599 PointsForgot to use %s formatter, but am using it!
String name = console.readLine("Enter your name: "); String pastTenseVerb = console.readLine("Enter your adjective: "); System.out.printf("%s really %s", name, pastTenseVerb);
Getting error "Looks like you forgot to use %s formatter"
String name = console.readLine("Enter your name: ");
String pastTenseVerb = console.readLine("Enter your adjective: ");
System.out.printf("%s really %s", name, pastTenseVerb);
1 Answer
![andren](https://secure.gravatar.com/avatar/229e60726cd92951c31d7303e40be2cd?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
andren
28,558 PointsThe error message that the code checker produces can often be misleading, in reality your code is perfectly fine.
The code checker for these challenges can be quite picky, not just about the result of your code but the way the program is coded. The test for the third task involves the code checker looking for a console.printf()
command with two %s
placeholders in it. Since you use System.out.printf()
instead of console.printf()
that ends up confusing the code checker, even though in reality the two commands do the same thing.
So all you need to do to fix this issue is to change the System.out.printf()
to console.printf()
instead.
Also for future reference it's worth noting that the challenge checker will often mark your code as wrong if the string you print does not match the example provided to the letter, that is not the case in this challenge but it's worth keeping in mind. I mention this due to the fact that the string you are printing in your solution is actually not a complete match with the string that was requested.
Laura Mckay
599 PointsLaura Mckay
599 PointsWow! I can't believe I missed that! The workspace doesn't work properly so have been running code through Intellij and am so used to writing System.out, I didn't even notice! What a dafty! Thanks a lot! :)
Jason Anders
Treehouse Moderator 145,859 PointsJason Anders
Treehouse Moderator 145,859 PointsHi Laura Mckay
Please, don't forget to close out the post by marking the response as Best Answer if it answered your question to your satisfaction. This helps keep the Community Forums up-to-date.
Thanks & Keep Coding!![:dizzy: :dizzy:](https://image-proxy-cdn.teamtreehouse.com/c2cf9bffe9990560f0066a99586597f4131a1a67/68747470733a2f2f7374617469632e7465616d74726565686f7573652e636f6d2f696d616765732f656d6f6a692f756e69636f64652f31663461622e706e67)
Jason - Treehouse Community Moderator