Skip to content

Tag: java-8

How to Iterate list of list of Java Objects using Java 8

How to iterate and get through list of list of objects using Java 8 Also need to get the count of distinct customerIds CustomerEditVO and CustomerIssues are POJOs Post Request body —> Answer I have created all the given POJO’s and created the objects and list for your query.And also overrides t…

How to iterate over MultipartFile array using Java lambda and streams

Below is my code to upload some file attachments to external storage. I would like to know if there is a way to avoid for loop in the below method to iterate over the MultipartFile[] array so that everything will be done using the java streams and lambda functions. Would like to have any better way to achieve…

How to convert an array of map into a map in JAVA8?

Right now I have How to use JAVA8 stream to convert it into Update: Sorry I was being unclear. The map_array contains two maps, and each map has two entries with the first one being key as “k”, value as “k1” and second entry being key as “v” and value as “v1”. N…