• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Checked and Unchecked Exception

 
Ranch Hand
Posts: 59
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone confirm if the below is the exact classification for checked and unchecked exception?


1. Throwable (checked)
1.1 Error (unchecked)
1.1.1 unchecked hierarchy
1.2 Exception (checked)
1.2.1 checked hierarchy
1.2.2 RuntimeException (unchecked)
1.2.2.1 unchecked hierarchy
 
Ranch Hand
Posts: 384
MyEclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes your classification is correct.
In other words

Unchecked Exception = (Error and its subclass Exception + Runtime and its subclass Exception ).

Checked Exception = (Throwable Exception - Unchecked Exception).






 
Ranch Hand
Posts: 300
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In simple words, Any Exception which is sub-class or inherited from RuntimeException is unchecked Exception and doesn't require to be declared on throws clause. rest are checked exceptions.
 
    Bookmark Topic Watch Topic
  • New Topic