# Using Java 13 Text Blocks (Only) for Your Tests

DevFeed: [Using Java 13 Text Blocks (Only) for Your Tests](<https://devfeed.tech/articles/using-java-13-text-blocks-only-for-your-tests-18886.md>)

Original publisher: [Read original article](<https://www.morling.dev/blog/using-java-13-text-blocks-for-tests/>)

Published: 2020-01-13T16:30:00Z

Content type: tutorial

Language: en

Sources: [Gunnar Morling](<https://devfeed.tech/sources/gunnar-morling.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Code](<https://devfeed.tech/topics/code.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [building](<https://devfeed.tech/tags/building.md>), [java](<https://devfeed.tech/tags/java.md>), [java-9](<https://devfeed.tech/tags/java-9.md>), [language](<https://devfeed.tech/tags/language.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

This tutorial explains how to use Java 13 text blocks in test code while keeping the main code compatible with older Java versions. It discusses preview language features, release cadence, and the importance of Java 8 compatibility for libraries.

## Source excerpt

Table of Contents An Example Configuration Should You Do This? When Java 9 was introduced in 2017, it was the last major version published under the old release scheme. Since then, a six month release cadence has been adopted. This means developers don't have to wait years for new APIs and language features, but they can get their hands onto the latest additions twice a year. In this post I'd like to describe how you can try out new language features such as Java 13 text blocks in the test code of your project, while keeping your main code still compatible with older Java versions.