What does `throws` keyword indicate?

  1. Throw an exception
  2. Catch an exception
  3. Declare an exception
  4. Handle an exception
Correct answer Declare an exception

Explanation

The `throws` keyword is used to declare that a method may throw an exception.

Update: Admin added a tag on this question

Topics

By Admin · · 36 views