[Solved] java array method to return an array [closed]
Assuming you want to return an array with two values (namely the min and the max), you can build that in one line like return new int[] { min, max }; I would also prefer Integer.min(int, int) and Integer.max(int, int) for finding those values. Like, static int[] records(int[] score) { int max = score[0], min … Read more