I just want to know what happens when this code is written:
public static void main(String[] args) throws IOException

You will not be obligated to write something like:

try {

} catch(IOException io) {

}

in your code. Meaning that if a method throws an IOException you will not have to catch it but if it is thrown there will be no place for the exception to "go" since nothing calls main(), so the program will end with exception.

And for that reason, you shouldn't ever throw exceptions from main().

You will not be obligated to write something like:

try {

} catch(IOException io) {

}

in your code. Meaning that if a method throws an IOException you will not have to catch it but if it is thrown there will be no place for the exception to "go" since nothing calls main(), so the program will end with exception.

Thank you.