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)
2
Q
Disadvantages of Arrays
A
Fixed Size
Limited functionality
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.
4
Q
Advantages or Java Collections:
A
Flexible
Can hold any type of object
5
Q
Disadvantages of Java Collections:
A
Not as accessible
6
Q
List
A
An ordered collection permitting duplicates
7
Q
Set
A
A collection that contains no duplicates
8
Q
Maps
A
Describes a mapping from keys to values without duplicate keys.