Given:.
1. import java.io.*; 2. import java.util.*; 3. import static java.lang.Short.*; 4. import static java.lang.Long.*; 5. public class Main { 6. public static void main(String[] args) { 7. long x = 123456789; 8. short y = 22766; // maximum value of a short is 32767 9. System.out.printf("%1$+10d %2$010d ", x, MAX_VALUE - y); 10. System.out.println(new Date()); 11. } // w w w. j a v a 2 s . c om 12. }
Which are true? (Choose all that apply.)
A is correct.
Both Short and Long have static MAX_VALUE fields, so the reference to MAX_ VALUE in line 9 is ambiguous.
(If line 4 was removed, the answer would be B, C, D, and E.).