Answer:
Initialize the “longest word” by an empty string and update it when a longer word is found
Step-by-step explanation:
import java.util.stream.Stream;
public static String findLongest(String[] spellingList) {
return Stream.of(spellingList).reduce("", (longestWord, word) -> (
longestWord.length() < word.length() ? word : longestWord
));
}