Why is it not possible to implement a functional interface using a lambda expression outside a class?

前端 未结 0 1267
攒了一身酷
攒了一身酷 2021-01-02 01:31

One can implement a functional interface this way:

abstract class predicate implements Predicate {

    public static boolean test(int e) {
            


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题