The reason the output was the same with or without your throw statement is that Java already throws an instance of ArithmeticException when you divide a number by zero. Your condition would only make sense if you throw a different exception.
public class ArithmeticException extends RuntimeException
Thrown when an exceptional arithmetic condition has occurred. For example, an integer "divide by zero" throws an instance of this class. ArithmeticException objects may be constructed by the virtual machine as if suppression were disabled and/or the stack trace was not writable.