-
-
Save tamboer/142a3f70172778d12cb703ebb575b26e to your computer and use it in GitHub Desktop.
Java Simple Lambda Koan
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 Caps { | |
public String capitalize(String name); | |
} | |
@Koan | |
public void simpleLambda() { | |
Caps caps = (String n) -> { | |
return n.toUpperCase(); | |
}; | |
String capitalized = caps.capitalize("James"); | |
assertEquals(capitalized, __); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment