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();
  }
 }
}

posted @ 2017-06-30 18:09  RLiunx  Views(262)  Comments(0)    收藏  举报