Consider we have two lists List and List. The List of Subject is defined in Student class.
or consider we have below code that we want to convert into Java 8.
List<String> list = new ArrayList();
for(int i = 0; i < 10; i++) {
for(int j = 0; j < 10; j++) {
if(dataMap[i][j] == 1)
list.add(new Data(i,j));
}
}
We want to convert above code into Java 8.
https://javatute.com/core-java/how-to-filter-data-from-nested-list-using-stream-java-8/
Top comments (0)