Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #7664
| Date | 2011-09-06 21:38 -0700 |
|---|---|
| From | Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Avoid derived class to override a method yet should allow callers to invoke the method |
| References | <79cc1af8-1f3c-41c7-bbe2-8c5085b25e7c@t9g2000yqi.googlegroups.com> |
| Message-ID | <8OydneypBoL9aPvTnZ2dnUVZ_rednZ2d@posted.palinacquisition> (permalink) |
On 9/6/11 9:05 PM, Ethan wrote: > Hello, > > I have a requirement where base class has method (implemented) and > derived class shouldn't be able to override it. > However, the method needs to be invoked by a caller who creates an > instance of the derived class. > > Is this possible? Can you explain why simply marking the method "public final" does not suffice for your needs?
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
Avoid derived class to override a method yet should allow callers to invoke the method Ethan <sam_cit@yahoo.co.in> - 2011-09-06 21:05 -0700
Re: Avoid derived class to override a method yet should allow callers to invoke the method Peter Duniho <NpOeStPeAdM@NnOwSlPiAnMk.com> - 2011-09-06 21:38 -0700
Re: Avoid derived class to override a method yet should allow callers to invoke the method Lew <lewbloch@gmail.com> - 2011-09-06 21:40 -0700
Re: Avoid derived class to override a method yet should allow callers to invoke the method Ethan <sam_cit@yahoo.co.in> - 2011-09-06 22:40 -0700
Re: Avoid derived class to override a method yet should allow callers to invoke the method Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-09-07 10:35 +0000
Re: Avoid derived class to override a method yet should allow callers to invoke the method Lew <lewbloch@gmail.com> - 2011-09-07 08:14 -0700
csiph-web