Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Person {
- private String name;
- private Place birthPlace;
- public Person() {}
- public setName(String name) {
- this.name = name;
- }
- public setBirthPlace(Place birthPlace) {
- this.birthPlace = birthPlace;
- }
- public String getName() {
- return name;
- }
- public Place getBirthPlace() {
- return birthPlace;
- }
- }
- public class Person {
- private final String name;
- private final Place birthPlace;
- public Person(String name, Place birthPlace) {
- this.name = name;
- this.birthPlace = birthPlace;
- }
- public String getName() {
- return name;
- }
- public Place getBirthPlace() {
- return birthPlace;
- }
- }
- public class Person {
- public final String name;
- public final Place birthPlace;
- public Person(String name, Place birthPlace) {
- this.name = name;
- this.birthPlace = birthPlace;
- }
- }
- public class Person {
- private final String name;
- private final Place birthPlace;
- @ConstructorProperties({"name", "birthPlace"})
- public Person(String name, Place birthPlace) {
- this.name = name;
- this.birthPlace = birthPlace;
- }
- public String getName() {
- return name;
- }
- public Place getBirthPlace() {
- return birthPlace;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement