@@ -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.
2929The code will look like the following:
3030```
3131public 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