Is there any way for an object of a subclass created by a superclass reference to use a superclass method , which is also overridden by the subclass, without using super() in the sub-method and without creating a new object?
If I'm not clear, please tell me. Thanks. [ June 12, 2006: Message edited by: Allen Sylvester ]
Thanks. If someone comes up with some way, please tell.
posted 13 years ago
I would suggest you seek the answer to a different question. That is what brought about this requirement and what could be changed to eliminate it. Needing to do what you wish is a clear indication that something is seriously wrong. Maybe your classes are too tightly coupled and too dependent on implementation. Maybe a subclass has overridden the method and not adhered to the contract as it should have, maybe the contract was fatally flawed to begin with. Regardless, the best advice I can give is to explain why you feel you need to do this and maybe someone here will have a better solution.