Question
1. public class
Test {
2. public static void main(
String[] args) {
3. int x = 0;
4. assert (x > 0): "assertion failed";
5. System.out.println("finished");
6. }
7. }
What is the result and why?
A. finished
B. Compilation fails.
C. An AssertionError is thrown.
D. An AssertionError is thrown and finished is output.