Exception Handling 1.What is Exception Handling in Java? Java provides Exception Handling mechanism to handle Runtime errors that occur in JVM. There are checked exceptions in a program that we expect to occur in certain situations. Exception handling mechanism catches these checked exceptions and takes relevant actions. 2.In Java, what are the differences between a Checked and Unchecked? Checked Exceptions extend Throwable class, but they do not extend RuntimeException or Error classes. UncheckedException extend RuntimeException class. Checked Exceptions are checked at compile time in Java. Unchecked Exceptions happen at Runtime, so they are not checked at compile time. IOException, SQLException etc. are examples of Checked Exceptions. NullPointerException, ArithmeticException etc. are examples of Unchecked Exceptions. 3. What is the base class for Error and Exception classes in Java? Error as well as Exception class is derived from Throwable class in Java. ...
Top 1000+ Interview Question Java JSP Spring Hibernate java collection multithreading java string serialization and desensitization final keyword in java package java design patterns maven git repository cloud computation UNIX shell interview question