I have ArrayList with random Integers. How can I remove from this list one minmum value and maximum value?
List < Integer > theBigList = new ArrayList <> ();
Random theGenerator = new Random();
for (int n = 0; n < 14; n++) {
theBigList.add(theGenerator.nextInt(6) + 1);
};
I used method Colections.max nad minimum but I think it removes all of maximum and minimum values from ArrayList.
Thank you in advance for you help