Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class Person {
private final int age;
private final String firstName;
private final String lastName;
public Person(int age, String firstName, String lastName) {
this.age = age;
this.firstName = firstName;
this.lastName = lastName;
}
// getters...
}
Person mary = new Person(25, "Mary", "Watson");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment