"I would like to add that in Java 17, you can use records to create immutable structures (including tuples). Additionally, Java Tuples have already been implemented and are more powerful in third-party libraries that you can use, such as:

- javatuples https://mvnrepository.com/artifact/org.javatuples/javatuples/1.2

- jmmo tuples https://mvnrepository.com/artifact/org.jmmo/tuples/1.4

- moonshine-tuple https://mvnrepository.com/artifact/io.github.ololx.moonshine/moonshine-tuple/0.13.0

- and others.

Alexander Kropotin
Alexander Kropotin

Written by Alexander Kropotin

PhD in Physics & Mathematics with experience in software development and team management. Currently working as a Senior Software Engineer, specializing in Java

Responses (1)