Record
Also written: records
A one-line, immutable type for plain data, like `record MenuItem(String name, int priceCents) {}`. Java gives it a constructor, accessors, `toString` and an `equals` that compares contents.
Also written: records
A one-line, immutable type for plain data, like `record MenuItem(String name, int priceCents) {}`. Java gives it a constructor, accessors, `toString` and an `equals` that compares contents.