File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception question

 
Meg Adal
Ranch Hand
Posts: 70
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
following question is from mock exam
Name the superclass of all exceptions in the Java language.
A. Throwable
B. Exception
C. Error
D. Object
Corrrect answer is A
I thought it should be B as Throwable is parent of class Exception and Error and All exceptions' parent is Exception class
Please correct me if I am wrong
Thanks in advance
Megan
 
Jose Botella
Ranch Hand
Posts: 2120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess : because Exception, being also an Exception, isn't superclass of itself
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I couldn't agree more
 
Ron Newman
Ranch Hand
Posts: 1056
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a very well written question; where did you find it? Object is also a superclass of all exceptions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic