Last active
December 23, 2017 20:37
-
-
Save lgsantiago/ae8fbcf6237df86df858e040fdc8ee66 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
| interface MyGreeting { | |
| String processName(String str); | |
| } | |
| public static void main(String args[]) { | |
| MyGreeting morningGreeting = (str) -> "Good Morning " + str + "!"; | |
| MyGreeting eveningGreeting = (str) -> "Good Evening " + str + "!"; | |
| // Output: Good Morning Luis! | |
| System.out.println(morningGreeting.processName("Luis")); | |
| // Output: Good Evening Jessica! | |
| System.out.println(eveningGreeting.processName("Jessica")); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment