`
sooxin
  • 浏览: 250717 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

java 数据越界奇异问题

 
阅读更多

public class yy {
 public static void main(String[] args) {
  // TODO Auto-generated method stub
  System.out.println(2147483647*1000000);

  System.out.println(Math.abs(Integer.valueOf("-2147483647")));
  System.out.println(Math.abs(Integer.valueOf("-2147483648")));

  System.out.println("result:"+1/2);
  try {
   System.out.println(Math.abs(Integer.valueOf("-2147483649")));
  } catch (Exception e) {
   e.printStackTrace();
  }
 }
}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics