All Java methods can use the throws clause to handle the exceptions generated by the methods they invoke.
The throws clause is added to the header of the method definition. For example:
public static void main(String[] args) throws IOException { ... }