Created
March 24, 2020 12:33
-
-
Save shvyrev/69480409b01b95236cfd05e474f9bf69 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 Address { | |
public String street; | |
public String city; | |
public String country; | |
public static Address of(String street, String city, String country){ | |
final Address address = new Address(); | |
address.country = country; | |
address.city = city; | |
address.street = street; | |
return address; | |
} | |
@Override | |
public String toString() { | |
return "Address{" + | |
"street='" + street + '\'' + | |
", city='" + city + '\'' + | |
", country='" + country + '\'' + | |
'}'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment