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 trialSunny Mei
144 PointsHelp me find mistakes , can't understand why import is wrong.
//Task = Call the printf method on the console object and make it write out "<YOUR NAME> can code in Java!"
String firstName = "Sun"; console.printf("my name is %s", firstName);
//Error Check the spelling of your argument to the printf method. Make sure it is printing out what the instructions are asking for
1 Answer
Dmitry Ponomarenko
18,175 PointsHey! I guess you shouldn't import anything for this task. Excercise implies that "console" object is already declared. You just need to write exactly what is asked without any other code : )
Sunny Mei
144 PointsSunny Mei
144 PointsWell that solves the import problem but I'm still stuck on it. OP edit
Strings and Variables 6:24 with Craig Dennis is the lesson
Dmitry Ponomarenko
18,175 PointsDmitry Ponomarenko
18,175 PointsInstructions are asking to write ""%s can code in Java!", not "my name is %s". I guess that's a source of your problem.
Sunny Mei
144 PointsSunny Mei
144 PointsThanks for the help , I thought it was just a simple print your name out , should have seen the quotations.
Thanks