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 trialChance Goodman
448 PointsI have confusion with this question.
I would like to just be given an example.
String FirstName="Chance";
console.printf("%S is very confused rn")
1 Answer
Steven Mattia
1,698 PointsYou have it all right but just are not printing out the variable correctly. You do %s as a placeholder for a String that is coming up. In your case you use %s but do not provide the variable that should take that place so it does not know what to replace %s with. How you do this is add a comma after the text and add the variable like this:
String firstName = "Chance";
console.printf("%s is very confused rn", firstName);
Chance Goodman
448 PointsThank you
Mathew Tran
Courses Plus Student 10,205 PointsMathew Tran
Courses Plus Student 10,205 PointsThe validator for some of these quizzes are pretty strict.
console.printf("%s can code",firstName);
Matt.