Why is my simple comparator broken?

前端 未结 6 1258
故里飘歌
故里飘歌 2021-01-04 01:56

I have a class, which I have simplified to this:

final class Thing {
    private final int value;
    public Thing(int value) {
        this.value = value;
          


        
6条回答
  •  暖寄归人
    2021-01-04 02:01

    try

    System.out.println(Integer.MAX_Value - Integer.MIN_VALUE);
    

    This needs to return a positive number as MAX_VALUE > MIN_VALUE but instead prints -1

提交回复
热议问题