欢迎光临散文网 会员登陆 & 注册

【Java】 super()

2023-03-11 19:11 作者:ParisBarcelona  | 我要投稿

In object-oriented programming, a constructor is a special method used to initialize objects when they are created.

When a subclass is created, the constructor of its superclass is called automatically. If the constructor of the superclass requires arguments, then you need to pass those arguments to the superclass constructor using the super() keyword in the subclass constructor.


【Java】 super()的评论 (共 条)

分享到微博请遵守国家法律