• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Checked and Unchecked Exceptions

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting confused between Checked and Unchecked Exceptions.. especially in questions asking me -- Which of the following are checked exceptions?

Do we have to memorise all the checked and unchecked exceptions??

Can somebody provide pointers to some resource that can explain this topic.
Thanks in Advance.
 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All the classes subclass(direct/indirect) of RuntimeException class and RuntimeException class itself is unchecked exception.
 
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are a limited number of exception classes covered in the exam. Exceptions like IOException, InterruptedException etc which are actually related to other classes covered in the exam (IOException is thrown by some methods of File class, InterruptedException is thrown by some methods of Thread class and both File and Thread class are on the exam)...
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All subclasses of RuntimeException and Error are unchecked exception. And only the exceptions that you encountered while studying for OCPJP would be worth looking into.
 
Ranch Hand
Posts: 2066
IntelliJ IDE Clojure Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rikesh Desai wrote:
Do we have to memorise all the checked and unchecked exceptions??


In the Exception part of the book, they are mentioned that, if you know the provided exceptions whether they are checked or unchecked, that's enough!
 
reply
    Bookmark Topic Watch Topic
  • New Topic