diff --git a/src/main/java/co/ivi/jus/text/review/wxywizard/Island.java b/src/main/java/co/ivi/jus/text/review/wxywizard/Island.java new file mode 100644 index 0000000..f6e7a1b --- /dev/null +++ b/src/main/java/co/ivi/jus/text/review/wxywizard/Island.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2021, Xuelei Fan. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + */ + +package co.ivi.jus.text.review.wxywizard; + +public class Island { + public static void main(String[] args) { + String poetry = """ + No man is an island, + Entire of itself, + Every man is a piece of the continent, + A part of the main. + """; + System.out.println(poetry); +// 转义\""" + String poetryHtml = + "\n" + + "\n" + + "\n" + + "
\n" + + " No man is an island,
\n" + + " Entire of itself,
\n" + + " Every man is a piece of the continent,
\n" + + " A part of the main.\n" + + "
\n" + + "\n" + + "\n"; + System.out.println(poetryHtml); + System.out.println(); + String poetryTextArea = """ + + + +
+ No man is an island,
+ Entire of itself,
+ Every man is a piece of the continent,
+ A part of the main. +
+ + + """; + System.out.println(poetryTextArea); +// 老师为啥我这两个输出是false? + System.out.println(poetryHtml.equals(poetryTextArea)); + System.out.println(poetryHtml==poetryTextArea); + + } +} diff --git a/src/main/java/co/ivi/jus/text/review/wxywizard/poetry.html b/src/main/java/co/ivi/jus/text/review/wxywizard/poetry.html new file mode 100644 index 0000000..ad0e892 --- /dev/null +++ b/src/main/java/co/ivi/jus/text/review/wxywizard/poetry.html @@ -0,0 +1,18 @@ + + + + + poetry + + + + + +
+ No man is an island,
+ Entire of itself,
+ Every man is a piece of the continent,
+ A part of the main. +
+ + \ No newline at end of file