0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Mapの使い方

Last updated at Posted at 2020-05-16

#Mapとは

2つの情報をkey(キー)とvalue(値)で格納するデータ構造

###HashMapのインスタンス化

Map <key, value> マップの変数 = new HashMap<key, value>();

※Mapでvalueの重複することは可能ですが、keyが重複することは不可です。

要素を格納する場合はputメソッド
要素を取り出す場合はgetメソッド
要素をすべて削除する場合はclearメソッド
指定した要素を削除する場合はremoveメソッド

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?