16) The advantage(s) of the Random class’ pseudo-random number generators, compared to the
Math.random method, is that
A) you may create several random number generators
B) the generators in Random are more efficient than the one in Math.random
C) you can generate random ints, floats, and ints within a range
D) you can initialize and reinitialize Random generators
E) all but answer B
17) Java.text’s NumberFormat class includes methods that
A) allow you to format currency
B) allow you to format percentages
C) round their display during the formatting process
D) truncate their display during the formatting process
E) A, B, C, but not D
18) The advantages of the DecimalFormat class compared with the NumberFormat class include
A) precise control over the number of digits to be displayed
B) control over the presence of a leading zero
C) the ability to truncate values rather than to round them
D) the ability to display a % automatically at the beginning of the display
E) only A and B
19) Consider the following enumeration
enum Speed { FAST, MEDIUM, SLOW };
A) The ordinal value of MEDIUM is 2
B) The ordinal value of SLOW is 1
C) The name of the Speed enumeration whose ordinal value is zero is FAST
D) The name of the Speed enumeration whose ordinal value is one is SLOW
E) None of the above