We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c2a20c commit e8dc8edCopy full SHA for e8dc8ed
concepts/maps/about.md
@@ -14,6 +14,11 @@ Java has a number of different Map implementations.
14
Map<String, Integer> fruitPrices = new HashMap<>();
15
```
16
17
+~~~~exercism/note
18
+When defining a `Map` variable, it is recommended to define the variable as a `Map` type rather than the specific type, as in the above example.
19
+This practice makes it easy to change the `Map` implementation later.
20
+~~~~
21
+
22
`HashMap` also has a copy constructor.
23
24
```java
0 commit comments