public class demo1 {
public static void main(String[] args) {
Lambda1 lambda1 = new Lambda1() {
@Override
public void add() {
System.out.println("起飞");
}
};
Lambda1 lambda1 = (a)->{
System.out.println("起飞"+a);
};
lambda1.add(2);
}
}
interface Lambda1{
void add(int a);
}
网友评论