@@ -7,7 +7,7 @@ This is the code repository for [Java Coding Problems ](https://www.packtpub.com
7
7
** Improve your Java Programming skills by solving real-world coding challenges**
8
8
9
9
## 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
11
11
* Solve cutting-edge problems relating to collections and data structures
12
12
* Get to grips with functional-style programming using lambdas
13
13
* Perform asynchronous communication and parallel data processing
@@ -29,13 +29,16 @@ All of the code is organized into folders. For example, Chapter02.
29
29
The code will look like the following:
30
30
```
31
31
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;
39
42
}
40
43
```
41
44
0 commit comments