Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4d97005

Browse filesBrowse files
committed
JEP 368: Text Blocks (Second Preview)
1 parent d93e9cc commit 4d97005
Copy full SHA for 4d97005

File tree

Expand file treeCollapse file tree

3 files changed

+19
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+19
-0
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ This repository contains Java examples that are designed to track and document t
4343
* [Java 14](java-14/) (March, 2020)
4444
* [JEP 361](java-14/src/main/java/com/ibrahimatay/JEP361SwitchExpressions.java): Switch Expressions
4545
* [JEP 359](java-14/src/main/java/com/ibrahimatay/JEP359Records.java): Records (Preview)
46+
* [JEP 369](java-14/src/main/java/com/ibrahimatay/JEP368TextBlocks.java): Text Blocks (Second Preview)
4647

4748
* [Java 12](java-12/) (March, 2019)
4849
* API Improvements

‎java-14/pom.xml

Copy file name to clipboardExpand all lines: java-14/pom.xml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<artifactId>maven-compiler-plugin</artifactId>
2424
<configuration>
2525
<compilerArgs>--enable-preview</compilerArgs>
26+
<source>15</source>
27+
<target>15</target>
2628
</configuration>
2729
</plugin>
2830
</plugins>
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.ibrahimatay;
2+
3+
public class JEP368TextBlocks {
4+
public static void main(String[] args) {
5+
// JEP 368: Text Blocks (Second Preview)
6+
// https://openjdk.org/jeps/368
7+
8+
String json = """
9+
{
10+
"name": "Java",
11+
"version": 14
12+
}
13+
""";
14+
System.out.println(json);
15+
}
16+
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.