我对这段代码有点困惑。为什么不编译?
@FunctionalInterface
public interface Inter {
BigDecimal method (BigDecimal param);
}
public class Main {
public static void main {
Function<BigDecimal, BigDecimal> func = param -> BigDecimal.ZERO;
Inter i1 = param -> BigDecimal.ZERO; // compile
Inter i2 = func; // not compile
}
}
慕姐8265434
杨__羊羊
Helenr
相关分类