Martin Ahrer

Thinking outside the box

0001-01-01 1 min read

The following describes selected improvements of the Java JVM. See the Java 13 release notes.

Class data sharing (CDS) allows class metadata to be shared across different JVM instances to reduce startup time. Java 13 is now delivering Dynamic CDS Archives with JEP 350 that simplifies the process of generating a shared archive when an application is exiting.

Continue reading

0001-01-01 1 min read

The following describes selected improvements of the Java language. See the Java 13 release notes.

Java 13 is introducing the following language enhancements as developer preview.

  • JEP 354 is enhancing the switch expression introduced in {java12} by introducing the yield statement to return values from a switch expression.

  • JEP 355 introduces text blocks.A text block is a multi-line string literal that avoids the need for most escape sequences, automatically formats the string in a predictable way, and gives the developer control over format when desired.

Continue reading

0001-01-01 1 min read
Teeing
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/twelve/api/CollectorsApi.java[tag=teeing]

With Collectors.teeing we can have two collectors process a stream. The results of both collectors are then processed by a merge function.

0001-01-01 1 min read
Mismatch
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/twelve/api/FilesApi.java[tag=mismatch]

With Files.mismatch we can detect the first mismatching character while comparing two files.

0001-01-01 1 min read
Get Compact Number Instance
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/twelve/api/NumberFormatApi.java[tag=getCompactNumberInstance]

0001-01-01 1 min read

The following describes selected improvements of the Java API. See the Java 12 release notes.

Unresolved directive in <stdin> - include::StringApi.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::NumberFormatApi.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::CollectorsApi.adoc[leveloffset=+1] Unresolved directive in <stdin> - include::FilesApi.adoc[leveloffset=+1]

0001-01-01 1 min read
Indent
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/twelve/api/StringApi.java[tag=indent]

With String::indent we can easily indent any string. With earlier Java versions we would have to use 3rd-party libraries such as Apache commons-lang or implement yourself..

Transform
Unresolved directive in <stdin> - include::../../../../../../../../src/main/java/twelve/api/StringApi.java[tag=transform]

With String::transform we can easily transform any string.

Continue reading
Older posts Newer posts