Skip to content

Instantly share code, notes, and snippets.

@mcsee
Last active May 30, 2022 17:14
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 mcsee/f94d51d327592ca511b625bac37cb441 to your computer and use it in GitHub Desktop.
Save mcsee/f94d51d327592ca511b625bac37cb441 to your computer and use it in GitHub Desktop.
final class Address {
void print() {
System.out.println(this.street);
System.out.println(this.city);
System.out.println(this.zipCode);
}
bool isInCounty(Country country) {
return this.country == country;
}
class Job {
void printAddress() {
System.out.println("This is your position address");
this.address().print());
if (this.address().isInCountry(this.country()) {
System.out.println("It is a local job");
}
}
}
class Candidate {
void printJobAddress(Job job) {
job.printAddress();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment