Multiple Choice
What will be printed by the statements below? ArrayList<String> names = new ArrayList<String>() ;
Names.add("Annie") ;
Names.add("Bob") ;
Names.add("Charles") ;
For (int i = 0; i < 3; i++)
{
String extra = names.get(i) ;
Names.add (extra) ;
}
System.out.print (names) ;
A) [Annie, Bob, Charles, Annie, Bob, Charles]
B) [Annie, Bob, Charles, Charles, Bob, Annie]
C) [Annie, Annie, Bob, Bob, Charles, Charles]
D) [Annie, Bob, Charles, Bob, Charles]
Correct Answer:

Verified
Correct Answer:
Verified
Q15: Which one of the following is a
Q21: Consider the following code snippet:<br>String[] data =
Q29: What will be printed by the statements
Q35: Which code snippet finds the largest value
Q36: What is the output of the following
Q38: What is displayed after executing the given
Q39: How many elements can be stored in
Q49: What should you check for when calculating
Q71: When an array reading and storing input
Q107: When the order of the elements is