package com.test.lambda;
public class Lambda02 {
public static void main(String[] args) {
new LoginAction() {
@Override
public void excute(String use) {
System.out.println(use);
}
}.excute("jdk1.8之前调用接口内部方法!");;
LoginAction login = (String use)->{
System.out.println("Lambda表达式调用接口!"+use);
};
login.excute("登录成功了!");
}
static interface LoginAction{
void excute(String use);
}
}