Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exception handling for ocajp7

 
s sivaraman
Ranch Hand
Posts: 59
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Do i need to have a complete memorization of exception handling API for the exam?

thank you
 
Simon Roberts
Author
Ranch Hand
Posts: 170
7
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not all the classes, but you should have a decent idea of what makes a checked exception checked, and why an unchecked exception is unchecked. And you absolutely should have a complete understanding of the mechanism of try, catch, finally, try-with-resources, throw and throws.

Of course, since there are about as many objectives as questions, if you miss one objective entirely, you still have a fighting chance of passing, but that said, if you don't _understand_ the exception mechanism, you're not really a fit Java programmer (there's a value judgement for you

 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
s sivaraman wrote:Do i need to have a complete memorization of exception handling API for the exam?

No, that's not required at all! You don't know each exception class in the Java API.

For the OCA7 exam you'll need to know these exam objectives
Java SE 7 Programmer I, Exam Topics wrote:Handling Exceptions
> Differentiate among checked exceptions, RuntimeExceptions and Errors
> Create a try-catch block and determine how exceptions alter normal program flow
> Describe what Exceptions are used for in Java
> Invoke a method that throws an exception
> Recognize common exception classes and categories
So besides the really obvious knowledge (e.g. the differences between a checked exception, runtime exception and an Error; create a try-catch block; how exceptions alter normal program flow;...), you'll need to know/recognize a set of commone exception classes: e.g. NullPointerException, ClassCastException, ArrayIndexOutOfBoundsException and some more. Here you'll find the list of common exceptions mentioned in two available study guides.

Hope it helps!
Kind regards,
Roel
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simon Roberts wrote:And you absolutely should have a complete understanding of the mechanism of try, catch, finally, try-with-resources, throw and throws.

The try-with-resources is definitely not on the OCA exams (it's one of the exam topics of the OCP exams), so no need to worry about it during your OCA7 preparation
 
Simon Roberts
Author
Ranch Hand
Posts: 170
7
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whoops, true. My mistake, that's in the Programmer II / Professional exam. (Though you "should" know it anyway )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic