Question: What is the output of the following Java code? int[] arr = {2, 3, 6, 7, 5}; int i; for (i = arr.length-1; i >=

 What is the output of the following Java code? int[] arr

What is the output of the following Java code? int[] arr = {2, 3, 6, 7, 5}; int i; for (i = arr.length-1; i >= 1; i--) if (arr[i]%2 0) System.out.print(arr[i]); else System.out.print(arr[i]%3); System.out.print(arr[arr[i]]); Select one: a. 2166 b: 21607 C. 21606 d. 2167

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!