Question: 5. Write three methods. a) Write a method that retums the index of the smallest element in a onedimensional array of integers. If the number

5. Write three methods. a) Write a method that retums the index of the smallest element in a onedimensional array of integers. If the number of such elements is greater than 1 , return the smallest index. b) Write a method that returns the sum of all the elements inside a two dimensional array. c) Write the main method to test the above two methods. Here are the examples. 2. the output of after calling the method is 1 . (xample for b): assume input arry as (1,2);(3,4) the outpot of a her calling the method is 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
