Will somebody help me???? ANYBODY?? PLZZZZZZZZZZZZ

Assume that you have an array of integers named a. Which of these code segments print the same results?
I. int i = 0;
while (i < a.length)
{
System.out.println(a[i]);
i++;
}
II. int i;
for (i = 0; i <= a.length; i++)
{
System.out.println(a[i]);
}
III. for (int i : a)
{
System.out.println(i);
}

I and II only
II and III only
I and III only
All three print the same results.
All three print different results.

Respuesta :

I've never seen that third syntax. If it's legit, it probably does the same as I and II, which are the same.
ACCESS MORE
EDU ACCESS