Article View: borland.public.jbuilder.java.language
Article #20119Re: Why is "rest" marked as a reserved word?
From: William Harris
Date: Fri, 24 Oct 1997 00:00
Date: Fri, 24 Oct 1997 00:00
20 lines
1430 bytes
1430 bytes
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:
<62qqqg$2s82@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3443BF3E.B4E59C1C@knold.ballehs.dk> <3443F165.45BAFB30@corp.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,589384fd7686747a,start X-Google-Attributes: gidf74b3,public From: william@carsinfo.com (William Harris) Subject: Re: Why is "rest" marked as a reserved word? Date: 1997/10/24 Message-ID: <62qqqg$2s82@forums.borland.com> X-Deja-AN: 284672487 References: <3443BF3E.B4E59C1C@knold.ballehs.dk> <3443F165.45BAFB30@corp.borland.com> Organization: CARS Information Systems Newsgroups: borland.public.jbuilder.java.language