You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/practice/scrabble-score/.approaches/map-reduce/content.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,9 +49,11 @@ A [`private`][private] [`final`][final] variable is defined to be returned by th
49
49
It is `private` because it does not need to be directly accessed from outside the class, and it is `final` because its value does not need to be changed once it is set.
50
50
51
51
Several `private``final`[`static`][static] variables are then defined:
52
-
a [`HashMap`][hashmap] to hold the lookups of the scores for the letters;
53
-
a `String` array of the letters grouped by their common score;
54
-
and an `int` array of the scores for the letters.
52
+
53
+
- a [`HashMap`][hashmap] to hold the lookups of the scores for the letters
54
+
- a `String` array of the letters grouped by their common score
55
+
- an `int` array of the scores for the letters
56
+
55
57
They are `static` because they don't need to differ between object instantiations, so they can belong to the class itself.
56
58
57
59
In a [static block][static-block], the [`IntStream.range()`][range] method is called to iterate an index from `0` up to but including the length of the array of letters.
0 commit comments