BAEL-3587: Added %n new line example.
This commit is contained in:
parent
060557608c
commit
7ad1542856
|
@ -39,6 +39,11 @@ public class AddingNewLineToString {
|
||||||
rhyme = line1 + System.getProperty("line.separator") + line2;
|
rhyme = line1 + System.getProperty("line.separator") + line2;
|
||||||
System.out.println(rhyme);
|
System.out.println(rhyme);
|
||||||
|
|
||||||
|
//6. Using %n
|
||||||
|
System.out.println("7. Using %n");
|
||||||
|
rhyme = "Humpty Dumpty sat on a wall.%nHumpty Dumpty had a great fall.";
|
||||||
|
System.out.println(rhyme);
|
||||||
|
|
||||||
System.out.println("***HTML to rendered in a browser***");
|
System.out.println("***HTML to rendered in a browser***");
|
||||||
//1. Line break for HTML using <br>
|
//1. Line break for HTML using <br>
|
||||||
System.out.println("1. Line break for HTML using <br>");
|
System.out.println("1. Line break for HTML using <br>");
|
||||||
|
|
Loading…
Reference in New Issue