Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!53ab2750!not-for-mail From: "Arne Vajhøj" Subject: Re: hashCode Message-ID: <50269FD2.56656.calajapr@time.synchro.net> X-Comment-To: Eric Sosman Newsgroups: comp.lang.java.programmer In-Reply-To: <50269FD1.56653.calajapr@time.synchro.net> References: <50269FD1.56653.calajapr@time.synchro.net> X-FTN-AREA: COMP.LANG.JAVA.PROGRAMMER X-FTN-MSGID: 1:261/38 31c42acc X-FTN-REPLY: 1:261/38 f4c909b1 Content-Type: text/plain; charset=IBM437 Content-Transfer-Encoding: 8bit X-Gateway: time.synchro.net [Synchronet 3.16a-Win32 NewsLink 1.98] Lines: 31 Date: Sat, 11 Aug 2012 18:17:55 GMT NNTP-Posting-Host: 69.21.70.65 X-Complaints-To: news@tds.net X-Trace: newsreading01.news.tds.net 1344709075 69.21.70.65 (Sat, 11 Aug 2012 13:17:55 CDT) NNTP-Posting-Date: Sat, 11 Aug 2012 13:17:55 CDT Organization: tds.net Xref: csiph.com comp.lang.java.programmer:17708 To: Eric Sosman From: Arne Vajhoj On 8/11/2012 8:00 AM, Eric Sosman wrote: > On 8/10/2012 7:25 PM, Arne Vajhoj wrote: >> On 8/10/2012 3:17 PM, Roedy Green wrote: >>> On Fri, 10 Aug 2012 08:47:12 -0700 (PDT), bob smith >>> wrote, quoted or indirectly quoted someone >>> who said : >>> >>>> @Override >>>> public int hashCode() { >>>> return 1; >>>> } >>> >>> that's about the worst possible hashCode function. >> >> Yes, but the posted asked "Is it always technically correct to ..." >> not whether is was "best possible". > > He also asked whether it would "be potentially better." "better to use Object hashCode" which again should bring the correctness question before the performance question. Arne --- BBBS/Li6 v4.10 Dada-1 * Origin: Prism bbs (1:261/38) --- Synchronet 3.16a-Win32 NewsLink 1.98 Time Warp of the Future BBS - telnet://time.synchro.net:24