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
michael williams
19,492 Pointschallenge java IO task 4 console.printf not reading.
in java basics java challenge IO the console.printf gives me an error about "make sure to call the printf method on the console object".
which as far as I can see I am doing.
img : http://imgur.com/a/Eh1Wg
challenge link : https://teamtreehouse.com/library/java-basics/getting-started-with-java/io
any suggestions?
1 Answer
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsYou code is correct but you have to separate two printf-s:
console.printf("First Name: %s", firstName);
console.printf("Last Name: %s", lastName);
Remember for future challenges, they are created in a consequent way, so that you don't need to change the old code you wrote.
You have to go task by task. Try to apply this kind of concept next time when you encounter problems ...
Also, image is nice to post a code, but Markdown here is nicer, so pasting code here would be also great :) Faster to find errors
michael williams
19,492 Pointsmichael williams
19,492 Pointsthank you Alexander as soon as I learn to do that I will :)
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsAlexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsGreat! :)