LongPredicate test example

Description

LongPredicate test evaluates this predicate on the given argument.

Syntax

test has the following syntax.


boolean test(long value)

Example

The following example shows how to use test.


import java.util.function.LongPredicate;
//  www .j a va  2s  .  co m
public class Main {

  public static void main(String[] args) {
    LongPredicate i = (l) -> l>0;
    
    System.out.println(i.test(Long.MAX_VALUE));
  }
}

The code above generates the following result.