Collections.max(arraylist)
doesn\'t work, and a regular for
loop won\'t work either.
What I have is:
ArrayList
I have two ideas. First of all, you used forecast
in the parameter, but it should be forecasts
. Also, you never gave your code for the class Forecast
. I may be wrong, because I didn't see all of your code, but you need to convert Forecast to a Integer
. Do this by Integer i = Integer.parseInt(forecasts);
Next use Collections.max(i)