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?

配列・連想配列とは

Posted at

配列(Array)

同じ型のデータを連続して格納するためのデータ構造
配列の各要素は、インデックスを使用してアクセスされる
固定サイズで宣言される

例)
int[] numbers = {1, 2, 3, 4, 5};

連想配列(Associative Array)

キーと値のペアを格納するデータ構造
キーを使用して、対応する値にアクセスする
サイズは動的に変更可能

例)
Map<String, Integer> ageMap = new HashMap<>();

※インデックス

配列の要素にアクセスするために使用される整数値
配列内の要素の位置を示す

※キー

連想配列の要素にアクセスするために使用される識別子

0
0
0

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?