It throws an Error . It looks like you are getting a NullPointerException , but it is a subclass of java.lang.Error . Name AssertionError .
It is like a NullPointerException in the sense that you do not need to declare throws or anything else, it just throws it.
assert(false);
looks like
throw new AssertionError();
if you run your program using the -ea flag passed to the java program (VM).
no_ripcord
source share