

Java 16 features are supported in IntelliJ IDEA 2021.1, which is scheduled to be released this March.
INTELLIJ DELETE PROJECT CODE
Let’s quickly check the configuration of IntelliJ IDEA on your system to ensure you can get the code to run it. To create a record using IntelliJ IDEA 2021.1, select Record in the New Java Class dialog box. With just one line of code, the preceding example defines a record Person with two components name and age. Though it helps cut down on boilerplate code significantly, that isn’t the primary reason for its introduction. Records introduce a new type declaration that simplifies the task of modeling your immutable data.

You can use this link for a comprehensive list of the new Java 16 features. In this blog post, I will limit coverage of Java 16 to its language features, why you need them, and how you can start using them in IntelliJ IDEA. I’m personally excited about Java 16! It adds Records and Pattern Matching for instanceof as standard language features with Sealed classes continuing to be a preview feature (in the second preview).įun fact – Records was voted the most popular Java 16 language feature by 1158 developers in this Twitter poll, with Pattern Matching for instanceof second. However, you’ll see these numbers are going to increment at a much faster and predictable rate with Java’s six-month release cadence.

If you are still working with Java 8, you might have mixed feelings about the news of the release of Java 16.
