public record MedalCount(int gold, int silver, int bronze)
Tour d’horizon et cas d’utilisation des records
JDK 14 : JEP 359 Records (Preview)
JDK 15 : JEP 384 Records (Second Preview)
JDK 16 : JEP 395: Records
public record MedalCount(int gold, int silver, int bronze)