Java Programming Exception Handling 1. 2. Types of errors Compile time errors Run-time errors Compile time errors All syntax errors will be detected and displayed…