Main.java Complete the diffHiLo method. The method takes in a 2-D integer array and returns the difference between the h

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Main.java Complete the diffHiLo method. The method takes in a 2-D integer array and returns the difference between the h

Post by answerhappygod »

Main Java Complete The Diffhilo Method The Method Takes In A 2 D Integer Array And Returns The Difference Between The H 1
Main Java Complete The Diffhilo Method The Method Takes In A 2 D Integer Array And Returns The Difference Between The H 1 (33.2 KiB) Viewed 71 times
Main.java Complete the diffHiLo method. The method takes in a 2-D integer array and returns the difference between the highest element in the array and the lowest. The result should always be a positive number 4 6 Use the following to find absolute value: Main.java 1 class Main 2 { 3 public static void main(String[] args) { 5 int[][] a = { {-5,-2,-3,7}, 7 {1,-5,-2,2}, 8 {1,-2,3,-4) 9 }; 10 System.out.println(diffHilo(a)); // should print 12 11 } 12 public static int diffHilo(int[][] array) 13 { 14 15 } 16 } Math.abs(-1) ==> 1 Math.abs(6) ==> 6 Math.abs(-5) ==> 5
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply