Commit 01c110e6 authored by Uma Vani Ravuri's avatar Uma Vani Ravuri

Replace TestEmployee.java

parent 11c2438e
......@@ -92,12 +92,6 @@ public class TestEmployee {
listEmp.stream().filter(x -> !x.getDepartmentNames().stream().equals("EEE"))
.collect(Collectors.toList()).forEach(System.out::println);
listEmp.stream()
.flatMap(e -> e.getDepartmentNames().stream())
.filter(d -> !"EEE".equals(d.getDepartmentNames()))
.collect(Collectors.toList()).forEach(System.out::println);
//given a list of employees. Can you create a map with the count of employees each department has ?
//with key as department name and count of employees as value.
Stream<String> distinctDept=listEmp.stream()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment