True or False: You can only call public and protected constructors of the superclass in a subclass if the subclass is not in the same package because only those are inherited. If the answer is "False," please provide an example to illustrate. Thanks.
Hi, I think, U can access the public & protected constructors in other package also. But the reason is not correct as the constructors R not inherited, they R accessible. Thanks kanchan
Originally posted by Ranjan Chaudhuri: True or False: You can only call public and protected constructors of the superclass in a subclass if the subclass is not in the same package because only those are inherited. If the answer is "False," please provide an example to illustrate. Thanks.
Ranjan, You must forget that constructors are not inherited, right? Opps,
Thanks Kanchan and Bin. I need to learn to read the COMPLETE #$%^& question! Anyway, to confirm what you say with a quote from the JLS(8.2) "Constructors, static initializers, and instance initializers are not members and therefore not inherited."