Catch:
The next term to learn in Java exception handling is catch. An exception catch is code which realizes the exception has occurred and deals along with it appropriately. In the java terms, you say a thrown exception gets caught.
In the case of the IOException thrown since of the nonexistence file mentioned in the previous section, a catch statement writes an error message to the screen stating in which the specified file does not exist. It then permits the user to try entering a different filename if the first was incorrect, or it might exit. Within Java terminology then the IOException was caught.
Try:
Try is the java exception handling word which means a Java program is going to try to execute a block of code which might produce (throw) an exception. The try is way of telling the compiler in which a few attempt will be made to deal along with at least a few of the exceptions generated through the block of code.