The following compiles fine in my Eclipse:
final int j = 1/0; // compiles fine!!! // throws ArithmeticException: / by zero at run-time
Java
Java explicitly requires integer division by zero to trigger an ArithmeticException. The assignment to j can't be elided because that would violate the spec.
ArithmeticException
j