|
Size: 628
Comment:
|
Size: 929
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 19: | Line 19: |
== Records == * https://openjdk.org/jeps/395 Introduced in release 16. To model data as data. Easy and concise manner to declare data-carrier classes that by default make their data immutable. Can be described as nominal tuples. {{{#!highlight java record Point(int x, int y) { } }}} |
OpenJDK21
Install from Adoptium
1 cd ~
2 wget https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.7%2B6/OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz
3 tar tvzf OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz
4 tar xvzf OpenJDK21U-jdk_x64_linux_hotspot_21.0.7_6.tar.gz
5 nano ~/.bashrc
6 JAVA_HOME=/home/vitor/jdk-21.0.7+6/
7 MAVEN_HOME=/home/vitor/apache-maven-3.8.6/
8 PATH=$JAVA_HOME/bin/:$PATH:$MAVEN_HOME/bin/
9 # reload bashrc
10 # . ~/bashrc
11
Records
Introduced in release 16.
To model data as data. Easy and concise manner to declare data-carrier classes that by default make their data immutable. Can be described as nominal tuples.
1 record Point(int x, int y) { }
