Fiveable
Fiveable

How can we rewrite the following for loop as an enhanced for loop? int[] array = {30, 2, 5, 6} for (int i = array.length-1; i >= 0; i--) { System.out.println(array[i]); }




© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.

AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.