Lambda表达式的演化过程
interface iface {
void out();
}
class Stance1 implements iface {
@Override
public void out() {
System.out.println("Number One!");
}
}
static class Stance2 implements iface {
@Override
public void out() {
System.out.println("Number Two!");
}
}
class Stance3 implements iface {
@Override
public void out() {
System.out.println("Number Three!");
}
}
Stance3 stance3 = new Stance3();
stance3.out();
iface stance4 = new iface() {
@Override
public void out() {
System.out.println("Number Four!");
}
};
stance4.out();
iface stance5 = () -> {
System.out.println("Number Five! ");
};
stance5.out();
}