collections framework Flashcards

1
Q

—– is immutable
—— Is mutable, threadsafe and slower.
——– is mutable,faster, and not threadsafe

A

String
Stringbuffer
Stringbuilder

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

A collection of iterables that contain and manipulate a group of objects

A

The collections Frameworks

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

———- is similar to an array but it deals only with objects, they can grow in size

A

The collection framwork

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

what is included in the collections framework

What is not iterable or part of the collections framework

A

lists
sets
queues

Maps

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

Ordered collection, has an index and can have duplicates and null values.

A

Lists

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

unique element that don’t have a particular order

A

Sets

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

Collection that operates on a first in first our basis(add elements at the end and remove elements in the beginning)

A

Queue

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

a collections that we can add and remove elements from both ends

A

Deque

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

A collection of key-value pairs, where each key is unique and — to a single value.

A

Maps

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

Uses an array that can be sized dynamically

A

ArrayList

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

uses a series of nodes that point to the next node in the List

A

LinkedLists

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

stores elements using a hash table, which allows for efficient insertion, deletion, and lookup of elements. However, it does not guarantee any order of elements.

A

Hash set

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

stores elements in a sorted tree structure. The elements are automatically sorted in ascending order by default

A

Treeset

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

similar to HashSet, but it also maintains a linked list of elements in the order they were inserted

A

Linked Hashset

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

data structure that has no order to keys, no nulls

A

hash table

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

data structure with no order to keys, one null key, any null values

A

hash map

17
Q

data structure with ordered keys

A

tree map

18
Q

———– can change sizes and can store different data types while ———- can’t store different data types and they also can’t change sizes

A

Collections
Arrays