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 trialDante White
987 Points%n I understand why he's using %s but why is he using %n if he removes %n the output is still the same
%n I understand why he's using %s but why is he using %n if he removes %n the output is still the same
3 Answers
Steven Couture
2,106 Points%s is used in place of something. but %n is used to make a newline so that those blue letters for treehouse in the compiler are on a new line and not connected. I know that may not have been clear but I hope it helps and let me know if you need it explained better!
Kevin Gates
15,053 PointsDante White , you should mark @Steven Couture's answer as "Best Answer" so he gets points credit for helping you. Also, it helps new students quickly identify the answer to your question.
Julianne Boulton
408 PointsIn Java Basics course wasn't it shown that /n can be used? What's the difference between /n and %n?
Dante White
987 Pointsthanks
Himanshu Shukla
872 PointsHimanshu Shukla
872 Points%n is used to add a new line after the text it preceeds