Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

Why should we mention a method throws some exception/s?

The throws keyword allows the compiler to help you write code that handles this type of error, but it does not prevent the abnormal termination of the program. With the help of the throws keyword, we can provide information to the caller of the method about the types of exceptions the method might throw.
Source by rollbar.com #
 
PREVIOUS NEXT
Tagged: #Why #mention #method #throws
ADD COMMENT
Topic
Name
3+9 =