Question: using java Write a method named count Numbers, that takes a three dimensions integer array and an integer number n, and returns an n elements
Write a method named count Numbers, that takes a three dimensions integer array and an integer number n, and returns an n elements integer array. The functionality of this method is to count how many numbers in the received array that are dividable by n with remainder =0 up to remainder = n-1.e.g, it n= 3, then there should be three counted numbers for remainder =0,1, and 2, respectively, The counted numbers should be stored in the elements of the array to be returned such that the element's index maps to the remainder.eg. the counted number of the numbers that are dividable by n with remainder 2 will be assigned to the element of index 2. Use only the enhanced for loop. Do not use if or switch statements. Write a method named count Numbers, that takes a three dimensions integer array and an integer numbern, and returns an n elements Integer array The functionality of this method is to count how many numbers in the received array that are dividable by n with remainder = 0 up to remainder = n-1.eg., if n= 3, then there should be three counted numbers for remainder = 0,1 and 2. respectively. The counted numbers should be stored in the elements of the array to be returned such that the element's index maps to the remainder.e.g. the counted number of the numbers that are dividable by n with remainder 2 will be assigned to the element of index 2. Use only the enhanced for loop. Do not use if or switch statements
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
