Created
March 14, 2020 03:29
-
-
Save ashkrit/10cc5987c0013b81798794ddfff981ac to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//Address has priority , first home and then Office | |
if (p.home != null) { | |
System.out.println("Contacted at home address " + p.home.address); | |
return; // Magical return for early exit | |
} | |
if (p.office != null) { | |
System.out.println("Contacted at office address " + p.office.address); | |
return; // Magical return for early exit | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment