Skip to content

Instantly share code, notes, and snippets.

@SimonHarmonicMinor
Last active May 4, 2020 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SimonHarmonicMinor/26fcadcc0670f1c8efe9639d8922ba46 to your computer and use it in GitHub Desktop.
Save SimonHarmonicMinor/26fcadcc0670f1c8efe9639d8922ba46 to your computer and use it in GitHub Desktop.
Setters usage example
class Person {
private int age;
private String firstName;
private String lastName;
// getters and setters...
}
Person employee = new Person();
employee.setAge(25);
employee.setFirstName("Michael");
employee.setLastName("Brown");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment