| 0.1 The package java.lang includes the Integer class. In that class, what is the definition of MAX_VALUE ? The number 0x7fffffff is in hexadecimal, that is, base 16, notation. To indicate hexadecimal notation, start with "0x", followed by the hexadecimal value. In hexadecimal, there are sixteen digits: 0, 1, 2, . . ., 9, a, b, c, d, e, and f. The digits 0 through 9 have the same value as in decimal, and the letters 'a' through 'f' have the following decimal values: a 10 b 11 c 12 d 13 e 14 f 15 The decimal representation of hexadecimal 7ffffff is 7 ∗ 167 + 15 ∗ 166 + 15 ∗ 165 + 15 ∗ 164 + 15 ∗ 163 + 15 ∗ 162 + 15 ∗ 161 + 15 = 2147483647 Similarly, the decimal value of MIN_VALUE is −2147483648. Hypothesize the decimal value of each of the following: Integer.MAX_VALUE + 1 Math.abs (Integer.MIN_VALUE) Test your hypotheses with a small program that calls the System.out.println method. | |
| View Solution | |
| Next >> | |