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 / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between notify and notifyall method?

1217


Is ruby built on java?

949


Do I need to import java.lang package any time? Why?

1387


What are the types of arrays in java?

1090


What is java oops?

1080


What is functional interface in javatpoint?

1053


Can you access the private method from outside the class?

972


Explain the importance of throws keyword in java?

999


What is a locale?

1149


What is an example of declaration?

1006


What is java objectoutputstream?

985


What are the different types of multitasking?

1106


What is integer parseint?

990


What are the parts of methodology?

974


how its run?

1065