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 trialallen joass
Courses Plus Student 375 Pointshow can i replace my name as string in firstName variable.
help me please!
String firstName = " Allen ";
console.printf("Allen can code in Java%s");
1 Answer
Binyamin Friedman
14,615 PointsTo format a string using the printf method, put as many placeholders as you want in the string and then list the values that you want to use in the same order.
If you need more help then you should rewatch the video, because this is important to know and you shouldn’t be copy pasting for it.