- 1

Quiz question

System.out.println(Integer.MAX_VALUE+1==Integer.MIN_VALUE); Then o/p is 1. False or 2.true And y Can u anyone explain it

12th May 2020, 8:43 AM
Haritha Vuppula
Haritha Vuppula - avatar
1 Answer
+ 1
This is a simple case of overflow where if a value crosses the maximum limit of any type then it gets rolled over. By the way, it will result 'true'.
12th May 2020, 8:56 AM
Avinesh
Avinesh - avatar