看看下面的代码:
Long minima = -9223372036854775808L;
Long anotherminima = -9223372036854775808L;
System.out.println(minima==anotherminima); //evaluates to false
System.out.println(Long.MIN_VALUE);
Long another= 1L;
Long one = 1L;
System.out.println(another == one); //evaluates to true
Run Code Online (Sandbox Code Playgroud)
我无法理解这种行为..?我希望第一个eval也是真的..这就是我所期待的......
java ×1