Social Media

Category Archives for CoreJava

Java 8 Streams Revisited

https://tech.io/playgrounds/3312/java-8-streams-cookbook/streams-cookbookJava 8 Streams Revisited revisits my Java 8 Streams post –

Java 8 – Streams Cookbook

Ive split the post into 3 sections –

 

Code Snippets

 

The example below shows how filter and map can be used to extract values from a stream –


This example shows how we can use the matching methods findAny and findFirst –


This final example looks at groupBy and collect –


For more examples visit Java 8 – Streams Cookbook

1 2 3 12