This is for Java. I understand these terms and how they go over a variable storage limit it wraps around and becomes positive if the number was negative and vice versa.
I am having trouble getting these exceptions to be thrown.
this is the method.
// computes a + band saves result in answer
public void add (int a, int b)
I've tried adding 2,147,483,647 + 1
and-2,147,483,648 -1
and even dividing it but it doesnt give me an exception.
does anyone know what I am doing wrong?