Consider the following code:
String[] fruits = {"doggie", "badger", "cat", "gopher"};
int i = 3;
String str = "d";
for(String item : fruits)
{
i = item.indexOf("d") + 2;
str += item.substring(i);
}
System.out.println(str);
Assume that the loop accesses array elements in order. What is output by this code?