Skip to content

Arrays and Collection Framework

Büşra Oğuzoğlu edited this page Jul 3, 2022 · 31 revisions

Arrays and Collection Framework

1. Arrays:

Declaration:

type arrName[];
OR
type[] arrName;

Instantiation:

arrName = new type[size];

Can be combined in one statement:

type[] myArray = new type[size];

2. Multidimensional Arrays:

3. ArrayList:

4. LinkedList:

5. Stack and Queue:

6. Set (HashSet):

7. Map (HashMap):

Clone this wiki locally