Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.function.Predicate;

public class Main {
    public static void main(String... args) {
        Predicate<String> predicate = (s) -> s.length() > 0;

        predicate.test("foo"); // true
        predicate.negate().test("foo"); // false  
    }
}