Skip to content

Instantly share code, notes, and snippets.

@egealpay
Created February 27, 2019 10:22
Show Gist options
  • Save egealpay/771fc217b85389b78f225f7993c5e67f to your computer and use it in GitHub Desktop.
Save egealpay/771fc217b85389b78f225f7993c5e67f to your computer and use it in GitHub Desktop.
public class Person {
private House house;
public getHouse() {
return house;
}
public getZipCode() {
return house.zipCode;
}
}
public class House {
private Address address;
public getAddress() {
return adress;
}
public getZipCode() {
return address.zipCode;
}
}
public class Address {
private String zipCode;
public getZipCode() {
return zipCode;
}
}
public static void main(String[] args) {
...
...
String zipCode = person.getZipCode();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment