jdk8新特性
https://www.cnblogs.com/justcooooode/p/7701260.html#_label0
package com;
import java.util.Comparator;
import javax.swing.JButton;
public class Test2 {
public static void main(String[] args) {
new Thread(() -> {
for (int i = 0; i < 100; i++)
System.out.println("Lambda Expression");
}).start();
}
public static void test() {
Comparator<String> c = (s1, s2) -> Integer.compare(s1.length(), s2.length());
JButton button = new JButton("click");
button.addActionListener(e -> System.out.println("Lambda Expression"));
}
}