Skip to content

Instantly share code, notes, and snippets.

@ashkrit
Created March 14, 2020 03:16
Show Gist options
  • Save ashkrit/741276a9301dfa1e573dd2ee17da6597 to your computer and use it in GitHub Desktop.
Save ashkrit/741276a9301dfa1e573dd2ee17da6597 to your computer and use it in GitHub Desktop.
//Not using optional
if (p.email != null) {
System.out.println("Sending email to " + p.email);
}
if (p.phone != null) {
System.out.println("Calling " + p.phone);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment