Home > Mohamed Sanaulla: Extracting the elements of the Java Collection- The Java 8 way

Mohamed Sanaulla: Extracting the elements of the Java Collection- The Java 8 way

We all have extensively used Collection classes like List, Map and their derived versions. And each time we used them we had to iterate through them to either find some element or update the elements or find different elements matching some condition. Would it not be cool if there was an API which would iterate the contents and give us the end result... this exact problem is being solved by introducing support for Lambda Expressions(closures) and a enhanced Collection API to leverage the lambda expression support...