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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a text string?

1090


Can string be considered as a keyword?

1038


Name few java.lang classes introduced with java 8 ?

993


Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?

1070


What is the use of jtable?

1127


What is an arraylist in java?

1083


what are three ways in which a thread can enter the waiting state? : Java thread

1025


How can a gui component handle its own events?

1115


What do the thread?class methods run() and start() do?

1038


What are latest features introduced with java 8?

1092


Explain notify() method of object class ?

1108


What is double in java?

990


What is the use of set in java?

1124


What is difference between final and immutable?

1151


What is constructor chaining in java?

1069