Diese Präsentation wurde erfolgreich gemeldet.

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
×

## Hier ansehen

1 von 2 Anzeige

1.
When using a list iterator, on which condition will the IllegalStateException be thrown?
Select one:
a. Calling remove after calling next.
b. Calling add after calling previous.
c. Calling remove after calling add.
d. Calling previous after calling previous.
2.
Which of the following statements about sets is correct?
Select one:
a. Inserting and removing elements that have already been located is faster with a list than with a set.
b. A set allows duplicate values.
c. You can add an element to a specific position within a set.
d. A set is a collection of unique elements organized for efficiency.
3.
Rather than storing values in an array, a linked list uses a sequence of ____.
Select one:
a. indexes
b. nodes
c. elements
d. accessors
Solution
1. c. Calling remove after calling add.
as in iteratot we can only call remove after next
2.
d.A set is a collection of unique elements organized for efficiency.
as set can not have duplicate values and also indexing is not done in sets it uses keys and Inserting and removing elements that have already been located is faster with a list than with a set is false as the sets cannot be located.
3.
b Nodes
as nodes have both addresses and data and each next or previous nodes are accessed by these addresses
.

1.
When using a list iterator, on which condition will the IllegalStateException be thrown?
Select one:
a. Calling remove after calling next.
b. Calling add after calling previous.
c. Calling remove after calling add.
d. Calling previous after calling previous.
2.
Which of the following statements about sets is correct?
Select one:
a. Inserting and removing elements that have already been located is faster with a list than with a set.
b. A set allows duplicate values.
c. You can add an element to a specific position within a set.
d. A set is a collection of unique elements organized for efficiency.
3.
Rather than storing values in an array, a linked list uses a sequence of ____.
Select one:
a. indexes
b. nodes
c. elements
d. accessors
Solution
1. c. Calling remove after calling add.
as in iteratot we can only call remove after next
2.
d.A set is a collection of unique elements organized for efficiency.
as set can not have duplicate values and also indexing is not done in sets it uses keys and Inserting and removing elements that have already been located is faster with a list than with a set is false as the sets cannot be located.
3.
b Nodes
as nodes have both addresses and data and each next or previous nodes are accessed by these addresses
.

Anzeige
Anzeige