亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

代碼
提交代碼
import java.util.function.Function; public class DemoFunction { public static void main(String[] args) { doApply(s -> Integer.parseInt(s)); doCombine( str -> Integer.parseInt(str)+10, i -> i *= 10 ); } private static void doApply(Function<String, Integer> function) { int num = function.apply("10"); System.out.println(num + 20); } private static void doCombine(Function<String, Integer> first, Function<Integer, Integer> second) { int num = first.andThen(second).apply("10"); System.out.println(num + 20); } }
運行結果