Question: JAVA Write a program that creates a 5x5 2D array of integers. Populate it with random integers between 1 and 100 (see 2.10 if you

JAVA

Write a program that creates a 5x5 2D array of integers. Populate it with random integers between 1 and 100 (see 2.10 if you don't remember how to generate random integers - make sure you use Math.random() not the Random class). Write a static method that finds and returns the largest integer in a 2D array. In the main method, call the method on your array and output the result. You may want to print the contents of the array to check that your method is returning the correct answer. The method should have the following signature:

public static int findLargest(int[][] array)

Started with:

import java.util.Arrays;

public class MyProgram { public static void main(String[] args) { } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!