public interface InterfaceA {
void methodA();
//void methodB();
public static void main(String[] args) {
//只能在“接口只有一个需要实现的方法”的情况下使用
InterfaceA a = () -> {
System.out.println("A");
};
a.methodA();
}
}
public interface InterfaceA {
void methodA();
//void methodB();
public static void main(String[] args) {
//只能在“接口只有一个需要实现的方法”的情况下使用
InterfaceA a = () -> {
System.out.println("A");
};
a.methodA();
}
}