一、lambda表达式格式
//排序 按binlog_date
Collections.sort(resultList, (o1, o2) -> Long.valueOf(new JSONObject((Map<String, Object>) o2).getString("binlog_time"))
.compareTo(Long.valueOf(new JSONObject((Map<String, Object>) o1).getString("binlog_time"))));
lambda表达式
public void testLambda(){
Thread tOld = new Thread(new Runnable() {
@Override
public void run() {
System.out.println("原来的thread");
}
});
Thread tNew = new Thread(() -> System.out.println("lambda表达式的thread"));
}