标签描述示例@author标识一个类的作者,一般用于类注释@author description@deprecated指名一个过期的类或成员,表明该类或方法不建议使用@deprecated description指明当前文档根目录的路径Directory Path@exception可能抛出异常的说明,一般用于方法注释@exception exception-name explanation从直接父类继承的注释Inherits a comment from the immediate surperclass.插入一个到另一个主题的链接插入一个到另一个主题的链接,但是该链接显示纯文本字体Inserts an in-line link to another topic.@param说明一个方法的参数,一般用于方法注释@param parameter-name explanation@return说明返回值类型,一般用于方法注释,不能出现再构造方法中@return explanation@see指定一个到另一个主题的链接@see anchor@serial说明一个序列化属性@serial description@serialData说明通过 writeObject() 和 writeExternal() 方法写的数据@serialData description@serialField说明一个 ObjectStreamField 组件@serialField name type description@since说明从哪个版本起开始有了这个函数@since release@throws和 @exception 标签一样.The @throws tag has the same meaning as the @exception tag.显示常量的值,该常量必须是 static 属性。Displays the value of a constant, which must be a static field.@version指定类的版本,一般用于类注释@version info4.java代码规范
1.B(); 调用的B() 然后自动super(); 由于有this(" abc") 传进了第二个构造器
2.调用默认空构造器 输出: a
3.输出构造器 B(String name) b name
4.输出B()的空构造器 b
<img alt="1666260640592" loading="lazy">
继承课堂练习2: