3.java的核心接口
java8的四大核心函数式接口
1.Consumer : 消费型接口
void accept(T t);
2.Supplier :供给型接口
T get();
3.Function
R apply(T t);
4.Predicate
boolean test(T t);
使用跟其他函数式接口使用一致
java8的四大核心函数式接口
1.Consumer : 消费型接口
void accept(T t);
2.Supplier :供给型接口
T get();
3.Function
R apply(T t);
4.Predicate
boolean test(T t);
使用跟其他函数式接口使用一致