How are this() and super() used with constructors?
Constructors usethisto refer to another constructor in the same class with a different parameter list.
Constructors usesuperto invoke the superclass's constructor. If a constructor usessuper, it must use it in the first line; otherwise, the compiler will complain.
No comments:
Post a Comment