Install Java on MacOS cmd

Some useful @FunctionalInterface and when to use them

Functional Interface Function When to use java.util.function.Predicate<T> boolean test(T t); Boolean expression java.util.function.Consumer<T> void accept(T t); Just process T, return nothing java.util.function.Function<T, R> R apply(T t); Transform, compute from type T to type R java.lang.Comparable<T> int compareTo(T o); Compare one T object to another java.lang.Runnable void run(); Accept no params and return nothing java.util.concurrent.Callable<V> V…