1
JavaAdvanced#collections#oop
Functional interfaces used in streams (Function, Consumer, etc.) don't declare checked exceptions in their method signatures, so a lambda implementing them cannot throw a checked exception without wrapping it in a try-catch or an unchecked RuntimeException.
list.stream().map(s -> {
try { return process(s); } // process() throws IOException
catch (IOException e) { throw new RuntimeException(e); } // must wrap as unchecked
});