Exception Handling Questions and Answers in Java Programming
Objective Type Q&A(part 2)
1: An exception is an abnormal condition that arises
in a block of statements during program execution
2: In java,exceptions are the sub-classes of the built-in class throwable
3: In java an exception is an object that describes an
abnormal condition that has occurred in a piece of code.
4: Exception class is sub-classed to create a user-defined exception.
5:Exceptions of the RuntimeException type are automatically defined for java programs.
6: When using multiple catch statements,if the exception sub-classes
are not placed before their super-classes unreachable code error occurs.
7: A method specifies the exceptions that are not handled by it using the throws keyword
8: throw keyword is used to throw an exception explicitly
9: OutOfMemory is an example off Error type of exception
Comments
Post a Comment