语法:(参数)->{};(多package edu.xcdq;
@FunctionalInterface
interface IMessage{
public void print();
}
public class Demo02 {
public static void main(String[] args) {
IMessage shili = ()->{
System.out.println("hello");
System.out.println("word");
};
shili.print();
}
行式),(参数)->单行语句