Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public static void main(String[] args) {
Person person = new Person("Tom Criuse", 44);
modifyPerson(person);
System.out.println(person.getName());
}
private static void modifyPerson(Person person) {
person.setName("Brad Pit");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment