Chapter 16 Review Flashcards

1
Q

Iterator

A

An object that iterates through a collection and can remove elements from the collection during the iteration

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

An element in a list can be accessed by using the elements

A

index

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

Autoboxing

A

The automatic conversion of a value of primitive type to an object of the corresponding type-wrapper class

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

Unboxing conversion

A

The automatic conversion of an object of a type-wrapper class to the equivalent primitive type

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

What two data structures in Java provide array like storage but can be resized dynamically.

A

ArrayList and Vector

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

You can use a(n) ___________ to create a collection that offers only read-write access to yourself

A

un-modifiable wrapper

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

Assuming that myArray contains references to double objects, ________________ occurs when the statement “double number = myArray[0];” executes.

A

Auto - Unboxing

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

The algorithm ____________ determines if two collections have elements in common.

A

disjoint

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

Values of primitive types can be stored in collections

A

false

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

A Set can contain duplicate values

A

false

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

A map can contain duplicate keys

A

false

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

A linked list can contain duplicate values

A

true

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

A collection is a interface

A

false (Collections is a class; Collection is an interface)

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

Iterators can remove elements

A

true

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

With hashing, as the load factor increases the chance of collision decreases

A

false

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

A PriorityQueue permits null elements

A

false