質問するログイン新規登録

回答編集履歴

1

Map -> HashMap

2017/06/20 03:03

投稿

intelf___
intelf___

スコア868

answer CHANGED
@@ -1,7 +1,7 @@
1
1
  使い方: https://docs.oracle.com/javase/jp/8/docs/api/java/util/HashMap.html
2
2
  該当のクラスをAとして
3
3
  ```java
4
- Map<Integer, A> map = new Map<Integer, A>();
4
+ HashMap<Integer, A> map = new HashMap<Integer, A>();
5
5
  map.put(1, new A()); // 追加
6
6
 
7
7
  A a = new A();