Collections.max(arraylist) doesn\'t work, and a regular for loop won\'t work either.
Collections.max(arraylist)
for
What I have is:
ArrayList
Streams are perfect for these sort of problems.
Forecast highest = forecasts.stream() .max((fc1, fc2) -> fc1.getTemp() - fc2.getTemp()) .get();