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 trialD Din
Courses Plus Student 208 PointsWhat am I supposed to write here since I don't see a console ? Please help
What should I write here please help it says Call the printf method on the console object and make it write out "<YOUR NAME> can code in Java!"
// I have setup a java.io.Console object for you named console
String firstName = "Ben";
console.printf("My name is %s", firstName);
3 Answers
Judy Radloff
4,888 PointsSometimes to properly clear a challenge they want you to print out exactly what they asked for. The directions say "Call the printf method on the console object and make it write out "<YOUR NAME> can code in Java!"." Essentially everything is already hooked up for you and they want you to print out the sentence "Ben can code in Java!" Just change what you have in the printf method a bit and it should run.
Pedro Araya
1,912 PointsJust write ypur name :D or any name.
ola cherni
494 Pointsit should be.. console.printf ("%s\n", firstName);
D Din
Courses Plus Student 208 PointsD Din
Courses Plus Student 208 PointsThank you very much!!