Question: Programming Task 1: Write a method that uses a loop to find the greatest number in an integer array. The method only takes one parameter
Programming Task 1:
Write a method that uses a loop to find the greatest number in an integer array. The method only takes one parameter that is an integer array and returns the value of the greatest element of it. Additionally, you are also required to provide a main method in which the program asks the user to first input an integer n which denotes the number of elements in the array, and then the n numbers in the array. Type checking is required, the program should call the method after nvalid numbers are given.
Programming Task 2:
Write a recursive version for the method in Task 1. You may provide another Java file for this task.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
