Question: How would you rewrite this Java for loop as an enhanced for loop? int[] nums (3,6,1,9,7}; for (int x=0; x < nums.length; x++) {
How would you rewrite this Java for loop as an enhanced for loop? int[] nums (3,6,1,9,7}; for (int x=0; x < nums.length; x++) { System.out.println(nums[x]); }
Step by Step Solution
3.52 Rating (159 Votes )
There are 3 Steps involved in it
To rewrite the given for loop as an enhanced for loop in Ja... View full answer
Get step-by-step solutions from verified subject matter experts
