List<Employee> employeeList = createEmployeeList(); long count = employeeList.stream() .filter(e->e.getAge()>25) .count();System.out.println("Number of employees with age 25 are : "+count);
Don't miss the next article!
Be the first to be notified when a new article or Kubernetes experiment is published.
Share This