• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

throws question

 
Yuan Ye
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given that method aMethod() throws BaseException, SubException and RuntimeException of the following exception hierarchy

The question is from a mock exam. Given answer is C and D. I though B is also correct, isn't it?
Thanks
[ Jess added UBB [code] tags in order to preserve whitespace, so you can actually see the hierarchy. Check 'em out! ]
[ May 28, 2003: Message edited by: Jessica Sant ]
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
B is legal but not good practice, ie do not declare unchecked exceptions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic