java.math.BigInteger cannot be cast to java.lang.Long

前端 未结 8 695
醉话见心
醉话见心 2020-12-09 15:44

I\'ve got List dynamics. And I want to get max result using Collections. This is my code:

List dynamics=spy         


        
8条回答
  •  一生所求
    2020-12-09 16:04

    It's a very old post, but if it benefits anyone, we can do something like this:

    Long max=((BigInteger) Collections.max(dynamics)).longValue(); 
    

提交回复
热议问题