123456789101112131415



Question 1: public class Donkey {
public static void main(String[] args) {
boolean assertsOn = false;
assert (assertsOn) : assertsOn = true;
if(assertsOn) {
System.out.println("assert is on");
}
}
}

What is result?

1. no output
2. assert is on
3. no output
assert is on
4. assert is on
An AssertionError is thrown.