What are the two types of exceptions in java? Which are the differences between them?



What are the two types of exceptions in java? Which are the differences between them?..

Answer / Abhay Kumar Srivastava

There are two types of exceptions in Java: checked exceptions and unchecked exceptions. Checked exceptions (e.g., IOException, SQLException) must be declared in a method's throws clause or caught within the method, while unchecked exceptions (e.g., NullPointerException, RuntimeException) do not require a throws declaration.nnDifference: Checked exceptions represent programming errors that can occur during compile-time, while unchecked exceptions are runtime errors.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

How garbage collection is done in java?

1 Answers  


How will you reverse a link list without using recursion?

1 Answers   Global Logic,


What is a reflection package?

2 Answers  


How many functional interfaces does java 8 have?

1 Answers  


What are different types of arrays?

1 Answers  


How to access a variable if it is declared as private?

3 Answers  


Is it possible to specify multiple jndi names when deploying an ejb?

1 Answers  


What is pass by value?

1 Answers  


What is the symbol for average?

1 Answers  


How do you remove spaces in java?

1 Answers  


Is a class subclass of itself?

1 Answers  


what is mean by synchronization?

3 Answers   BOB Technologies, GCPL,


Categories