Click the Exhibit button. 1. import java.util.*; 2. 3. public class NameList { 4. private List names = new ArrayList(); 5. public synchronized void add(String name) { names.add(name); } 6. public synchronized void printAll() { 7. for (int i = 0; i

  1. An exception may be thrown at runtime.

  2. The code may run with no output, without exiting.

  3. The code may run with no output, exiting normally.

  4. The code may rum with output “A B A B C C “, then exit.

  5. The code may rum with output “A B C A B C A B C “, then exit.

  6. The code may ruin with output “A B C A A B C A B C “, then exit.


Correct Option: E,F

Find more quizzes: