Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What are the differences between unchecked exception, checked exception, and errors?

Answers were Sorted based on User's Feedback



What are the differences between unchecked exception, checked exception, and errors?..

Answer / nashiinformaticssolutions

• An Unchecked exception inherits from RuntimeException (which extends from exception). The JVM treats RuntimeException differently as there is no requirement for the application code to deal with them explicitly.
• A checked exception inherits from the exception class. The client code has to handle the checked exceptions either in a try-catch clause or has to be thrown for the super-class to catch the same. A checked exception thrown by a lower class (sub-class) enforces a contract on the invoking class (super-class) to catch or throw it.
• Errors (members of the error family) usually appear for more serious problems, such as OutOfMemoryError (OOM), that may not be so easy to handle.

Is This Answer Correct ?    0 Yes 0 No

What are the differences between unchecked exception, checked exception, and errors?..

Answer / hr@tgksolutions.com

• An Unchecked exception inherits from RuntimeException (which extends from exception). The JVM treats RuntimeException differently as there is no requirement for the application code to deal with them explicitly.
• A checked exception inherits from the exception class. The client code has to handle the checked exceptions either in a try-catch clause or has to be thrown for the super-class to catch the same. A checked exception thrown by a lower class (sub-class) enforces a contract on the invoking class (super-class) to catch or throw it.
• Errors (members of the error family) usually appear for more serious problems, such as OutOfMemoryError (OOM), that may not be so easy to handle.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is exception and error? and what is the difference between them?

2 Answers  


What is the use of conditional statement?

0 Answers  


Explain restrictions for using anonymous inner classes?

0 Answers  


is there a separate stack for each thread in java? : Java thread

0 Answers  


What is Java Reflection API? Why it’s so important to have?

0 Answers  


What is a nested list?

0 Answers  


What is parsing in grammar?

0 Answers  


What are identifiers in java?

0 Answers  


When is finally block not called?

0 Answers  


What is a boolean output?

0 Answers  


What are different data structures in java?

0 Answers  


Can I use % with real numbers?

0 Answers  


Categories