Skip to content

Instantly share code, notes, and snippets.

@shvyrev
Created March 24, 2020 12:33
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 shvyrev/69480409b01b95236cfd05e474f9bf69 to your computer and use it in GitHub Desktop.
Save shvyrev/69480409b01b95236cfd05e474f9bf69 to your computer and use it in GitHub Desktop.
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