An unhandled error has occurred.
Reload
X
UIZFORGE
Exams
Pricing
Career Paths
Resources
EN
Login
Sign Up
1
/ 5
Expert
Iris is reviewing a Java 8 pricing module before a certification-style code audit. The code contains assert balance >= 0 : balance; in production, but assertions are not enabled on the JVM. What happens when balance is negative?
An AssertionError is always thrown because assert is a language keyword.
The expression is evaluated but the message expression is skipped.
The assertion is not evaluated, so execution continues as if the assert statement were absent.
The compiler removes the method containing the assert statement.
AI Tutor
Stuck? Get a hint