Collections Flashcards

Sets, Maps, Lists, Arrays

1
Q

Advantages of Arrays

A

Efficient
Quick to access
Easy to add to
Type-safe (can only add variables of the same type)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Disadvantages of Arrays

A

Fixed Size

Limited functionality

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Java Collections

A

Java collections API provide developers with a set of classes and interfaces that make it easier to handle collections of objects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Advantages or Java Collections:

A

Flexible

Can hold any type of object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Disadvantages of Java Collections:

A

Not as accessible

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

List

A

An ordered collection permitting duplicates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Set

A

A collection that contains no duplicates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Maps

A

Describes a mapping from keys to values without duplicate keys.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly