Java has the concept of checked exceptions and unchecked exceptions.
Checked exceptions (those extending from Exception) require that they
are either handled at the point they occur or that the method in which
they occur is declared with the throws clause. Unchecked exceptions
(those which extend from RuntimeException) do not need to be declared in
methods and will propagate up the call stack (this is how Python
works). Searching for "exceptions in java" will give you a lot of
reading material for learning more about java exceptions.