• 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

Exceptions

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone tell me if we need to memorize the various Exception and Runtime classes off by heart in order to able to answer questions where overriding methods using various exceptions come into play?
I.E. what I am saying is in the real exam, will it tell you that for example, IOException is a checked exception and NumberFormatException is a runtime exception if you were determining if say a piece of code would compile if using overriding methods with these vaious exceptions tagged onto the end of each of the methods?
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't need to memorize the various exceptions for the exam. However, if you've studied exceptions at all, a few major ones should jump out at you as being either checked or unchecked exceptions.
For example, IOException is checked (as you pointed out) and things like ArrayIndexOutOfBoundsException is unchecked. Knowing a few of the more common ones by heart wouldn't hurt and, frankly, I think you'll end up knowing them simply from studying exceptions.
I hope that helps,
Corey
 
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Although you don't have to memorize all of them, you really should be familiar with all the exception classes in the java.lang package.
 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In general, you should know which are runtime exceptions. They usually test you for this while method overriding.
HTH,
- Manish
 
Rob Petterson
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to you all.For the time being I'll think I'll learn a few of the runtime exceptions just to play it safe - just the more obvious ones though.
 
Are we home yet? Wait, did we forget the tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic