|
Re: how to stop the subclass from overriding a method.: msg#02344ruby-talk
It makes more sense in java. Let me prove my point with an example. public final String format (Object obj) { return format(obj, new StringBuffer (), new FieldPosition (0)).toString(); } public abstract StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos); Java doesn't provide the faicility of multiple arguments. Hence one will have to resort to method overloading. But, all the first method is doing is create two objects and calling the second method. Hence there is no point in leaving this method free to be played around with. Also I believe in the web programming arena security concerns necessitate the surity that coe won't be dynamically changed. Hope I am not preaching the prophet. Venkat -- Posted via http://www.ruby-forum.com/.
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |