Which tag is synonymous to the @throws tag ?
-
@exception
-
@throwing
-
@threw
-
@except
Reveal answer
Fill a bubble to check yourself
A
Correct answer
Explanation
The @exception tag is a complete synonym for @throws in Javadoc. Both tags serve the identical purpose of documenting exceptions that a method may throw, and Javadoc treats them identically. The @throws tag is more commonly used in modern practice.
AI explanation
In Javadoc, @exception is a documented synonym for @throws — both tags document a checked exception that a method may throw, and they can be used interchangeably. The other listed tags aren't recognized Javadoc tags at all.