@@ -0,0 +1,1129 @@
+package com.wangwenjun.java8.chapter1;%0A%0Aimport sun.rmi.runtime.NewThreadAction;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.function.BiFunction;%0Aimport java.util.function.Function;%0Aimport java.util.function.Predicate;%0Aimport java.util.function.Supplier;%0A%0A/**%0A * Created by wangwenjun on 2016/5/23.%0A */%0Apublic class NewFutures %7B%0A    public static void main(String%5B%5D args) %7B%0A        Supplier%3CArrayList%3CString%3E%3E supplier = ArrayList::new;%0A        Function%3CString, Integer%3E stringIntegerFunction = String::length;%0A        Integer length = stringIntegerFunction.apply(%22wangwenjun%22);%0A        System.out.println(length);%0A%0A        BiFunction%3CList, String, Boolean%3E listEBooleanBiFunction1 = List%3CString%3E::add;%0A        ArrayList%3CString%3E strings = supplier.get();%0A        listEBooleanBiFunction1.apply(strings, %22alex%22);%0A        System.out.println(strings.get(0));%0A%0A%0A        BiFunction%3CNewFutures, Object, Boolean%3E isValid = NewFutures::isValid;%0A%0A%0A    %7D%0A%0A    private void testPredicate()%0A    %7B%0A        Predicate%3CObject%3E p= this::isValid;%0A    %7D%0A%0A    private boolean isValid(Object obj)%7B%0A        return true;%0A    %7D%0A%7D%0A

write the simple demo