Answers for "how to print \n in a string in java"

1

java how to go into newline while using print

// newline while using System.out.print();
System.out.print("First Line\nSecond Line");
//output:
//First Line
//Second Line
Posted by: Guest on November-08-2020
0

how to print \n in a string in java

System.out.println("\\n hello world");
// output:
// "\n hello world"
Posted by: Guest on November-08-2020

Code answers related to "how to print \n in a string in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language