Should our Javadoc classes extend abstract classes?
•
Java
Suppose I'm writing a class "mywork" that extends the abstract class "work" Now, suppose that all the methods I need in "mywork" have been declared and their Javadoc has been written in "work" Should I also add Javadoc in "mywork"?
Cheers!
Solution
It depends on If you do not override any methods, you cannot add Javadoc (class level only) It makes sense to add some JavaDocs to the class to explain why they exist
If you want to override methods, you can write Javadoc like this:
/** * {@inheritDoc} * This implementation also does... */
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码