8000 Update README.md · Coxcombo/Java-Coding-Problems@58cfeb0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 58cfeb0

Browse files
Update README.md
1 parent 8f100d7 commit 58cfeb0

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is the code repository for [Java Coding Problems ](https://www.packtpub.com
77
**Improve your Java Programming skills by solving real-world coding challenges**
88

99
## What is this book about?
10-
* Adopt the latest JDK 11 and JDK 12 features in your applications
10+
* Adopt the latest JDK 8 - JDK 13 features in your applications
1111
* Solve cutting-edge problems relating to collections and data structures
1212
* Get to grips with functional-style programming using lambdas
1313
* Perform asynchronous communication and parallel data processing
@@ -29,13 +29,16 @@ All of the code is organized into folders. For example, Chapter02.
2929
The code will look like the following:
3030
```
3131
public Map<Character, Integer> countDuplicateCharacters(String str) {
32-
Map<Character, Integer> result = new HashMap<>();
33-
// or use for(char ch: str.toCharArray()) { ... }
34-
for (int i = 0; i<str.length(); i++) {
35-
char ch = str.charAt(i);
36-
result.compute(ch, (k, v) -> (v == null) ? 1 : ++v);
37-
}
38-
return result;
32+
33+
Map<Character, Integer> result = new HashMap<>();
34+
35+
// or use for(char ch: str.toCharArray()) { ... }
36+
for (int i = 0; i<str.length(); i++) {
37+
char ch = str.charAt(i);
38+
result.compute(ch, (k, v) -> (v == null) ? 1 : ++v);
39+
}
40+
41+
return result;
3942
}
4043
```
4144

0 commit comments

Comments
 (0)
0