Java Tutorial | Part 58 | Exception Handling Part5 | Throws Keyword

preview_player
Показать описание
Throws:
throws is a keyword in Java which is used in the signature of method to indicate that this method might throw one of the listed type exceptions. The caller to these methods has to handle the exception using a try-catch block or throw keyword. 
Syntax:
type method_name(parameters) throws exception_list

Important points to remember about throws keyword: 
throws keyword is required only for checked exception
By the help of throws keyword we can provide information to the caller of the method about the exception.

If this video is useful to you, please like and share If you didn't subscribe kindly subscribe. So that you will get a notification about my new videos

#ARIVU_INFO
Рекомендации по теме
visit shbcf.ru