From d19f767a5f406983244f807be5e32a0a736a7dd3 Mon Sep 17 00:00:00 2001 From: wxywizard Date: Wed, 24 Nov 2021 00:17:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=87=E5=AD=97=E5=9D=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ivi/jus/text/review/wxywizard/Island.java | 51 +++++++++++++++++++ .../ivi/jus/text/review/wxywizard/poetry.html | 18 +++++++ 2 files changed, 69 insertions(+) create mode 100644 src/main/java/co/ivi/jus/text/review/wxywizard/Island.java create mode 100644 src/main/java/co/ivi/jus/text/review/wxywizard/poetry.html 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..6b91eb2 --- /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" + + ""; + 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 From 0ddcdfcdd5328f9d885a93f1bb00bd19dba71db9 Mon Sep 17 00:00:00 2001 From: wxywizard Date: Wed, 24 Nov 2021 00:22:39 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=96=87=E5=AD=97=E5=9D=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/co/ivi/jus/text/review/wxywizard/Island.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 6b91eb2..991174a 100644 --- a/src/main/java/co/ivi/jus/text/review/wxywizard/Island.java +++ b/src/main/java/co/ivi/jus/text/review/wxywizard/Island.java @@ -14,7 +14,7 @@ public static void main(String[] args) { A part of the main. """; System.out.println(poetry); - +// 转义\""" String poetryHtml = "\n" + "\n" + From 4b6989b3b846e08cf2fb5258ba29bc58a2ede83c Mon Sep 17 00:00:00 2001 From: wxywizard Date: Wed, 24 Nov 2021 01:08:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=96=87=E5=AD=97=E5=9D=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E9=97=AE=E9=A2=98,=E5=A2=9E=E5=8A=A0=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/co/ivi/jus/text/review/wxywizard/Island.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 index 991174a..f6e7a1b 100644 --- a/src/main/java/co/ivi/jus/text/review/wxywizard/Island.java +++ b/src/main/java/co/ivi/jus/text/review/wxywizard/Island.java @@ -26,7 +26,7 @@ public static void main(String[] args) { " A part of the main.\n" + "\n" + "\n" + - ""; + "\n"; System.out.println(poetryHtml); System.out.println(); String poetryTextArea = """