0
Why the result is true?
System.out.print(Integer.MAX_VALUE+1==Integer.MIN_VALUE);
2 odpowiedzi
+ 2
overflow
Numbers are represented by a finite number of bits.
imagine
max int has 1111111 in binary and if you add 1 you will overflow and reach 0000000 which is min int
It's not exactly like this, because of sign bit but you get the idea
0
Jay. is that C#?