What happens if an Iterator object is active and the underlying collection is updated via collection operations?

What will be an ideal response?


The Iterator object will throw a ConcurrentModificationException. If the exception was not
thrown, then a program may produce unpredictable results if the Iterator object and the collection methods both accessed the
collection.

Computer Science & Information Technology

You might also like to view...

Which of the following is NOT a button on the navigation toolbar?

(A) Current position (B) Add new (C) Find (D) Delete

Computer Science & Information Technology

The Windows standard is to use book title capitalization for the prompt, but sentence capitalization for the title.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

How many times will outputLabel be called?for(customer = 1; customer <= 20; ++customer)     for(color = 1; color <= 3; ++color)          outputLabel();

A. 0 B. 3 C. 20 D. 60

Computer Science & Information Technology

A(n) ____________________ group lets you organize layers, and is similar to a folder on your hard drive.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology