What does the following code fragment print? int[] a = new int[10]; for (int i = 0;

Question:

What does the following code fragment print?

int[] a = new int[10];

for (int i = 0; i < 10; i++)

a[i] = 9 - i;

for (int i = 0; i < 10; i++)

a[i] = a[a[i]];

for (int i = 0; i < 10; i++)

System.out.println(a[i]);

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: