Introduction
If you have not tried the Text Blocks feature introduced in Java 13 then the following post will help you to get startedJava 13 - Example to use Text Blocks for Multi line String literals
We can concatenate TextBlocks as we do with normal String as demonstrated in the following example.
Example
public class TextBlock {
public static void main(String[] args) {
String html = """
<html>
<body>
""" +
""" <h1> Header One </h1>
<p> Paragraph One </p>
""" +
"""
<h1> Header One </h1>
<p> Paragraph One </p>
""" +
"""
</body>
</html>
""";
System.out.println(html);
}
}
Hi. I want to get in touch with Asif Shah. I have something important to discuss with him.
ReplyDeleteSorry, I had to comment here as i couldn't fine any email or contact on this blog. Please contact me on theaasifshah@gmail.com or +91 9419386381 (whatsapp)
Looking forward. Thank you
asif 999 AT G MAIL
DeleteHi. I want to get in touch with Asif Shah. I have something important to discuss with him.
ReplyDeleteSorry, I had to comment here as i couldn't fine any email or contact on this blog. Please connect.