// create immutable record added in jdk 14
// provides all-args constructor, getters, equals, hashcode and toString
public record Person (String name, String address) {}
// usage
Person person = new Person("John Doe", "100 Linda Ln.");
// access fields
String name = person.name();
String address = person.address();