If we try to run this code:
int d = 10/0;
We get a compiler error. So we cannot divide by zero.
Now consider this code:
<
The first:
int d=10/0;
will be resolved due compile time, because it is constant. The second will not be resolved because the compiler do only syntax checks, not math check.