Solved

What Will Be Printed by the Statements Below? ArrayList<String> Names

Question 29

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") ;
Names.set(2, "Doug") ;
Names.add(0, "Evelyn") ;
System.out.print (names) ;


A) [Annie, Bob, Charles, Doug, Evelyn]
B) [Evelyn, Annie, Bob, Doug]
C) [Evelyn, Doug, Charles]
D) [Evelyn, Annie, Doug, Charles]

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions