Discover a wealth of knowledge at Westonci.ca, where experts provide answers to your most pressing questions. Explore thousands of questions and answers from knowledgeable experts in various fields on our Q&A platform. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.

What will be the output of the following statements?
arraylist names = new arraylist();
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);