Types of exceptions in Java Programming
There are three types of exceptions:
1.checked exception:- Achecked exception is an exception that is typically a user error or a problem that cannot be foreseen by the programmer. For example, if a file is to be opened, but the file cannot be found, an exception occurs. These exceptions cannot simply be ignored at the time of compilation.
2.Runtime exception:-A runtime exception is an exception that occurs that probably could have been avoided by the programmer. As opposed to checked exceptions, runtime exceptions are ignored at the time of compilation.
3.Error:- Serious error you really should not try to catch, e.g. OutOfMemoryError.