Which statements, when inserted at (1), will result in the program throwing an exception when run?
public class Main { public static void main(String[] args) { // (1) INSERT STATEMENT HERE } }
Select the two correct answers.
(b) and (d)
(b) will throw a java.util.IllegalFormatPrecisionException because of the precision specification.
(d) will throw a java.util.FormatFlagsConversionMismatchException because of the + flag.
The other statements will produce the following output, respectively, excluding (b) and (d): |L |, |!|, |h|, |! |, |null|, | V|.