When assertions were introduced in 1.4, you needed to compile with the -ea flag. With version 1.5, this became the default, so you no longer need to compile with -ea. However, you still need to use the flag when running.
When I run this code with -ea, the output shows assertions are enabled. Without the -ea flag, the output shows assertions are disabled.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org