This is just my curiosity to know why java compiler doesn't show any warning in this case while it shows warning for unchecked operations to predict a probable ClassCastException.
public class DivideByZero {
public static void main() {
int number = 3/0;
System.out.println(number);
}
}
Above code is guaranteed to produce an ArithmeticException.
This is an example only. There are more ways to guarantee a runtime exception without any warning during compilation.