【学习总结】Consumer, Supplier, Predicate, Function接口用法汇总
Consumer接口publicvoidtest_consumer(){Listlist=newArrayList(){{add(1);add(2);add(3);add(4);}};//1.使用接口实现方法Consumerconsumer=newConsumer(){@Overridepublicvoidaccept(Integerinteger){System.out.println(inte