Question 1 of 10
Brine Harbor stores leftover mooring tags. What text does this Java code display?
ArrayList<String> tags = new ArrayList<String>();
tags.add("oak");
tags.add("elm");
tags.add("ash");
for (String t : tags) {
System.out.print(t);
}
- A. oakelmash
- B. oak elm ash
- C. elmash
- D. IndexOutOfBoundsException