Article View: borland.public.jbuilder.java.language
Article #20126Re: Why is "rest" marked as a reserved word?
From: Rich Wilkman
Date: Fri, 24 Oct 1997 00:00
Date: Fri, 24 Oct 1997 00:00
33 lines
1976 bytes
1976 bytes
William: The list of reserved methods is from Flannigan. Maybe I wasn't as clear as I could have been. I wanted JBuilder to flag those methods so that you didn't use them in instances when you weren't actually over-riding them. It would have just been a visual cue. Might annoy those already familiar with Java but would stop a really hard to debug "weird" problem if someone used those names but didn't know that they were special. -Rich William Harris wrote: > In article <3443F165.45BAFB30@corp.borland.com>, rwilkman@corp.borland.com > says... > >I also pushed to get: > > > >clone, getClass, notifyAll, equals, hashCode, toString, finalize, notify > >and wait to that list. These are reserved method names in java -- ones > >you should never use in your own stuff. No go on that one. > > I respectfully disagree with you and for the most part agree with the end > result. toString in particular has to be overridden in your classes if you > want a sensible result; the default Object toString() isn't going to give you > anything useful. > > Flanagan (in Java in a Nutshell) goes further and suggests that it might be > wise to override equals() in order to call the equals() methods of the objects > referred to within the original object; and the same with the clone() method, > for Cloneable objects. I can't say I've done either, but I see his point. > > William Harris william@carsinfo.com
Technical Details
Message-ID:
<34511537.1210ED2E@corp.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3443BF3E.B4E59C1C@knold.ballehs.dk> <3443F165.45BAFB30@corp.borland.com> <62qqqg$2s82@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,589384fd7686747a X-Google-Attributes: gidf74b3,public From: Rich Wilkman <rwilkman@corp.borland.com> Subject: Re: Why is "rest" marked as a reserved word? Date: 1997/10/24 Message-ID: <34511537.1210ED2E@corp.borland.com> X-Deja-AN: 284779247 References: <3443BF3E.B4E59C1C@knold.ballehs.dk> <3443F165.45BAFB30@corp.borland.com> <62qqqg$2s82@forums.borland.com> Organization: None Newsgroups: borland.public.jbuilder.java.language