When i am trying to subtract a smaller negative value from a bigger negative value ,int type is returining a positive value.
can anyone explain why?
Here is the code:
public class Test {
public static void main(String[] args) {
int a=-2147483648;
int b =a-18;
System.out.println(b);
}
} output: 2147483630