Predicates in Java8

Predicates are boolean valued functions which returns true/false based on some conditions. Simple. Predicate<T> in java is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference. Now let’s see how to use Predicates. We have one below Employee class and we want to filter out Employees based on some given conditions. Use Cases Print names of … Continue reading Predicates in Java8