Question: Write a method that returns the largest integer in the list. You can assume that the list has at least one element. public Integer
Write a method that returns the largest integer in the list. You can assume that the list has at least one element. public Integer maximum(Integer[] list){ int maximum = list[0]; for (int i: list) { if (i > maximum) { maximum = i; return maximum; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
