Java Java Objects Meet Objects Methods

why did we add a %n after %s?

why couldn't we just use the %s

1 Answer

Jennifer Nordell
Jennifer Nordell
Treehouse Staff

Hi there! The %n is used as a new line character. After this prints out, there will be a new line printed. You could also use, a "\n" but be aware that these can be platform specific where the %n is platform neutral and is advised for use.

Hope this helps! :sparkles:

OHH!!! i was sooo confused, thanks alot, i used to only use \n, thanks to you, you cleared things up for me! Thanks again :D