Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the 'throws' clause in method signature?
Answer: The 'throws' clause is used to declare that a method may throw one or more types of exceptions. It is part of the method signature.

Example:

void myMethod() throws CustomException { /* method code */ }
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook