Question: Consider the following method, which is supposed to return the value of the largest element in an array of integers: I / Precondition: a .
Consider the following method, which is supposed to return the value of the largest element in an array of integers:
I Precondition: alength
public int findMaxint a
int max;
for int ; length;
if
max;
return max;
Line
IT Line
Line
Line
Line
Unfortunately it has two bugs. On which lines?
A Line and Line
B Line and Line
C Line and Line
D Line and Line
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
