+ 2
How do i can print "\n" in java ?
"\n" is the escape fuction which provides us the new line but without going to new line how can we print in output " \n".
3 Respuestas
+ 7
System.out.println("\\n");
+ 2
Vaishnavi Dattatray Satav, note that, actually, Olek Szczepura's reply contains another escape sequence -- "\\".
+ 2
for every escape character use extra backslash... like \\n \\t