A)
->throws keyword is not used to create any block of statements unlike, try, catch and finally.
->”throws” doesn’t throw exception explicitly unlike “throw” keyword.
->”throws” keyword is used to announce that a method body has doubtful code in it. But not handled. It indicates to the calling methods that they are responsible to handle the announced exceptions.
->throws keyword is associated with method declaration and is used to create exception specification.
Exception specification = throws some exception list….
In the exception specification we can specify one or more exception class names.
->throws keyword is used to pass an exception handling duty to the next level. i.e. to the caller of the method.
Comments
Post a Comment