Created
February 27, 2019 10:22
-
-
Save egealpay/771fc217b85389b78f225f7993c5e67f 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 { | |
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