Skip to content
This repository was archived by the owner on Feb 10, 2021. It is now read-only.

Commit edd19dd

Browse files
authored
Update readme.md
- enables syntax highlights
1 parent b0f936c commit edd19dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lambdas/readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The purpose of the lambda and functional interfaces is to **make it easier to cr
1818

1919
A typical example is interface `Comparator<T>`:
2020

21-
```
21+
```java
2222
accounts.sort(new Comparator<Account>() {
2323
@Override
2424
public int compare(Account o1, Account o2) {
@@ -27,6 +27,6 @@ A typical example is interface `Comparator<T>`:
2727
});
2828
```
2929
It can be easily simplified using lambda expression:
30-
```
30+
```java
3131
accounts.sort((a1, a2) -> a1.getFirstName().compareTo(a2.getFirstName()));
3232
```

0 commit comments

Comments
 (0)