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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started