Java Predicate

Negating a Predicate in Java

Java 8 predicate negate() returns a predicate that is the logical negation of this predicate. Java 11 introduced not() which is also the same.

Java 8 Predicate Example

Java Predicates are boolean-valued statements that may be true or false depending on the test argument. Predicates are used to filter Streams.

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.