Java OOPs Interview Questions and Answers
Question: What is the 'throws' clause in Java?Answer: The 'throws' clause in Java is used to declare exceptions that a method might throw. It indicates that the method does not handle the exceptions and passes them to its caller.Example:
|
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Is it helpful? Yes No
Most helpful rated by users: