Last active
March 13, 2017 17:14
-
-
Save EmmaEwert/e50263841252e4798605df797c305705 to your computer and use it in GitHub Desktop.
This file contains 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
public static String theLongestWord(String[] words) { | |
return Stream.of(words) | |
.reduce((a, b) -> a.length() > b.length() ? a : b) | |
.orElse(null); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment