Question: QUESTION 2 Create a method called searchint that accepts a two-dimensional array of integers and an int as parameters and returns the number of times
QUESTION 2 Create a method called searchint that accepts a two-dimensional array of integers and an int as parameters and returns the number of times the integer parameter appears in the array. For example, if the array (as created by the program below) is 11 35 5 6 5 33 1 533 And the integer parameter is 5, the value returned would be 3 (the number 5 appears 3 times in the array) public class Question2 public static void main(String[] args) { int[] [] arr - ((11, 35, 5, 6), 15, 33), (1, 5, 33); System.out.println("The number 5 appears "+search Int (arr, 5) + " times in the array."); } //main
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
