Skip to content

Commit 4d97005

Browse files
committed
JEP 368: Text Blocks (Second Preview)
1 parent d93e9cc commit 4d97005

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

README.md

+1
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

+2
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>
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)