My code does not give errors, however it is not displaying the minimum and maximum values. The code is:
Scanner input = new Scanner(System.in); int array[]
Imho one of the simplest Solutions is: -
//MIN NUMBER Collections.sort(listOfNumbers); listOfNumbers.get(0); //MAX NUMBER Collections.sort(listOfNumbers); Collections.reverse(listOfNumbers); listOfNumbers.get(0);