-
-
Save shvyrev/94929e0f5819685a6c9a23ad8d160047 to your computer and use it in GitHub Desktop.
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
public class Person { | |
public String name; | |
public int age; | |
public Address address; | |
public static Person of(String name, int age, Address address){ | |
final Person person = new Person(); | |
person.name = name; | |
person.age = age; | |
person.address = address; | |
return person; | |
} | |
@Override | |
public String toString() { | |
return "Person{" + | |
"name='" + name + '\'' + | |
", age=" + age + | |
", address=" + address + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment