4 ms·
Records are still a preview feature in Java 14 (Apr 2020). Java 15 (Fall 2020) contains a second preview. They're usable, but you have to pass a flag to the com
by hyperpape 6y ago
Records are still a preview feature in Java 14 (Apr 2020). Java 15 (Fall 2020) contains a second preview. They're usable, but you have to pass a flag to the compiler to enable them, and you run some small risk that the syntax will change (it's pretty simple, so I'd guess that won't happen).
I'm guessing that they'll land in Spring or Fall 2021, but that's just an outsider's guess. The really important cutoff is Spring 2022, when Java 18 is intended to be an LTS version.
- J-Kuhn 6y agoYou have to pass `--enable-preview` to BOTH compiler and runtime. If you think about it - the feature may change significantly or be even removed - it makes sense to only support a preview features in one java version. Providing backward compatibility for preview features is simply not intended.