Lowest price ever! Learn Generative AI for 48% less!
Get my discount+ 4
What is the function of \n?
what is the function of \n in This program 👉 https://code.sololearn.com/cLjIpcIbZ2W5/?ref=app
3 Answers
+ 12
\n is used for new line, you can use println too
+ 2
\ also let's u have things that u can't have normally in strings
suppose to print
Hi \ we ll need "Hi \\"
"hi" we ll need. "\"hi\""
so it's also used to escape stuffs that we normally can't use inside string,
0
new line