避免溢位計算

java.lang.Math;

Math.addExact(Long.MAX_VALUE-1L, 2L); //計算溢位

throw java.lang.ArithmeticException: long overflow



arrow
arrow
    文章標籤
    Math.addExact java long overflow
    全站熱搜

    咪卡恰比 發表在 痞客邦 留言(0) 人氣()