語法:(參數(shù))->{};(多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();
}