BiPredicate test example

Description

BiPredicate test method evaluates this predicate on the given arguments.

Syntax

test has the following syntax.


boolean test(T t,  U u)

Example

The following example shows how to use test.


import java.util.function.BiPredicate;
/*from   w w  w  .  j  av  a  2 s  . co m*/
public class Main {
  public static void main(String[] args) {
    BiPredicate<Integer, Integer> bi = (x, y) -> x > y;
    System.out.println(bi.test(2, 3));
  }
}

The code above generates the following result.