What is the difference between throw and throws?
Practice this question from Quiz: Exception Hierarchy, with options and an explanation.
Question
What is the difference between throw and throws?
Option A — Correct answer
throw raises an exception; throws declares possible propagation
throw is an executable statement; throws is part of a method signature.
Option B
They are identical
Option C
throws creates objects
Option D
throw only works on strings