We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Here, \n is not required. When we use println, then internally it will append \n to bring cursor to next line. So, if you give \n then there will be extra blank line and cusor will go to next to next line.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 0: Hello, World.
You are viewing a single comment's thread. Return to all comments →
System.out.println("Hello World \n");
Here, \n is not required. When we use println, then internally it will append \n to bring cursor to next line. So, if you give \n then there will be extra blank line and cusor will go to next to next line.