-
-
Save SimonHarmonicMinor/26fcadcc0670f1c8efe9639d8922ba46 to your computer and use it in GitHub Desktop.
Setters usage example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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