Program crashes
Sometimes things happen in your code that Java just can't handle — dividing by zero, for example.
Then Java throws an exception and your program crashes.
Catch the exception with try { ... } catch (ArithmeticException e) { ... } and print Not by zero! instead.
void main() {
int x = 10 / 0;
IO.println(x);
}
An exception is an object Java creates when something goes wrong. Examples: dividing by 0 (ArithmeticException), accessing null (NullPointerException), an array index that's too big (ArrayIndexOutOfBoundsException).
Without try/catch, the exception travels up through the calling methods. If nobody catches it, the program dies — with a stack trace in the terminal.
With try/catch you catch the exception and can react to it, without your program crashing.