Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > comp.lang.java.programmer > #6385
| Date | 2011-07-21 20:36 -0400 |
|---|---|
| From | Arne Vajhøj <arne@vajhoej.dk> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: The behavior of "equals" method of Arrays.asList() implementation |
| References | <b30a98ec-acc8-4e7b-bb9d-0de48a554d07@g2g2000vbl.googlegroups.com> <safe-20110628121412@ram.dialup.fu-berlin.de> |
| Message-ID | <4e28c628$0$308$14726298@news.sunsite.dk> (permalink) |
| Organization | SunSITE.dk - Supporting Open source |
On 6/28/2011 6:18 AM, Stefan Ram wrote: > Alex J<vstrength@gmail.com> writes: >> So the first question is: whether it is safe to use equals for *all* >> the JDK's collections? > > What is »safe« supposed to mean in this case? > > The »equals« methods of the collections behave > as documented in their Java SE docs, just like > every other collection method does. The obvious answer. >> The second question is whether JVM adds "hidden" implementation in >> certain places > > The compiler sometimes adds constructors so that > the implementation behaves as specified in the > JLS, but never »equals« methods. The compiler is not the JVM, but your interpretation may be correct that his question included compiler. Arne
Back to comp.lang.java.programmer | Previous | Next | Find similar
Re: The behavior of "equals" method of Arrays.asList() implementation Arne Vajhøj <arne@vajhoej.dk> - 2011-07-21 20:36 -0400
csiph-web