You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
import java.util.Objects;
|
|
import java.util.function.Predicate;
|
|
|
|
public class Java8DoubleColon {
|
|
public static void main(String[] args) {
|
|
Predicate<Object> p = Objects::nonNull;
|
|
System.out.println(false == p.test(null));
|
|
System.out.println(true == p.test(p));
|
|
}
|
|
} |