Suppose that a variable a is declared as int a = 2147483647 (or equivalently, Integer.MAX_VALUE). What does

Question:

Suppose that a variable a is declared as int a = 2147483647 (or equivalently, Integer.MAX_VALUE). What does each of the following print?

a. System.out.println(a);

b. System.out.println(a+1);

c. System.out.println(2-a);

d. System.out.println(-2-a);

e. System.out.println(2*a);

f. System.out.println(4*a);

Explain each outcome.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question
Question Posted: