tag
- para = line1+"
"+line2;
- para = line1+"
"+line2;
- para = line1+"
"+line2;
+ //3. Line break for HTML using “
”
+ System.out.println("3. Line break for HTML using
");
+ para = line1 + "
" + line2;
+ System.out.println(para);
+
+ //4. Line break for HTML using “
;”
+ System.out.println("4. Line break for HTML using
");
+ para = line1 + "
" + line2;
+ System.out.println(para);
+
+ //5. Line break for HTML using \n”
+ System.out.println("5. Line break for HTML using \\n");
+ para = line1 + "\n" + line2;
+ System.out.println(para);
}
-}
+}
\ No newline at end of file
diff --git a/core-java/src/main/java/com/baeldung/string/page.html b/core-java/src/main/java/com/baeldung/string/page.html
index a4ad90954b..fc39ee0057 100644
--- a/core-java/src/main/java/com/baeldung/string/page.html
+++ b/core-java/src/main/java/com/baeldung/string/page.html
@@ -1,12 +1,31 @@
-Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
+Humpty Dumpty had a great fall.
+
-Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall
-Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall
-Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall
+
+
+
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall.
+Humpty Dumpty sat on a wall.
+Humpty Dumpty had a great fall
+
Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall
+Humpty Dumpty sat on a wall.
Humpty Dumpty had a great fall
+Humpty Dumpty sat on a wall.
+Humpty Dumpty had a great fall
-
+