mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-20 22:17:09 +08:00
Merge pull request #1857 from cyunrei/fix_typo
修正 java 8 新特性中 Comparator 接口示例代码变量名的错误
This commit is contained in:
commit
dfb9a308a8
@ -142,8 +142,8 @@ public int compare(Integer o1, Integer o2) {
|
||||
//Lambda
|
||||
Collections.sort(strings, (Integer o1, Integer o2) -> o1 - o2);
|
||||
//分解开
|
||||
Comparator<Integer> comperator = (Integer o1, Integer o2) -> o1 - o2;
|
||||
Collections.sort(strings, comperator);
|
||||
Comparator<Integer> comparator = (Integer o1, Integer o2) -> o1 - o2;
|
||||
Collections.sort(strings, comparator);
|
||||
```
|
||||
|
||||
**3.`Listener` 接口**
|
||||
|
Loading…
x
Reference in New Issue
Block a user