Question: What is the output of the following program code: int[] array(1, 4, 3, 6, 8, 2, 5); int what= array[0]; // scan the array
What is the output of the following program code: int[] array(1, 4, 3, 6, 8, 2, 5); int what= array[0]; // scan the array for (int index=0; index < array.length; index++){ if (array[ index ] > what) what array[ index ]; } System.out.println(what);
Step by Step Solution
There are 3 Steps involved in it
The given code is a Java program that finds the maximum value in an integer array Lets walk through ... View full answer
Get step-by-step solutions from verified subject matter experts
