Multiple choice technology programming languages

public class test { Line 1. public static void main(String [] a) { Line 2. assert a.length == 1; Line 3. } Line 4. } Which two will produce an AssertionError? (Choose two.) A. java test B. java -ea test C. java test file1 D. java -ea test file1 E. java -ea test file1 file2 F. java -ea:test test file1

  1. AB

  2. BC

  3. AE

  4. BE

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Running with -ea enables assertions. If no arguments are passed (length 0) or more than one argument is passed (length 2 or more), the assertion a.length == 1 fails, raising an AssertionError.