import static java.lang.System.*; import java.util.Arrays; public class DiverseArrayTester { public static void main(String[] args) { int[][] mat1 = { { 1, 3, 2, 7, 3}, {10,10, 4, 6, 2}, { 5, 3, 5, 9, 6}, { 7, 6, 4, 2, 1}}; int[][] mat2 = { { 1, 1, 5, 3, 4}, {12, 7, 6, 1, 9}, { 8,11,10, 2, 5}, { 3, 2, 3, 0, 6}}; out.println("sum: "+DiverseArray.arraySum(mat1[0])); int[] sums = DiverseArray.rowSums(mat1); out.println("array of sums:"+Arrays.toString(sums)); out.println("mat1 diverse? "+DiverseArray.isDiverse(mat1)); out.println("mat2 diverse? "+DiverseArray.isDiverse(mat2)); } }