Re: Java questions: Urgent



On 30 Jan 2006 20:33:52 -0800, "Nikil Joshi" <kiranpannu@xxxxxxxxx>
wrote, quoted or indirectly quoted someone who said :

>It is urgent so that I don't repeat same mistakes in my next interviews.

You wont get the same questions. You should have answered "hashCode
and equals"
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.



Relevant Pages

  • Re: Distinct ID Number Per Object?
    ... globally unique as the usual ... hashCode() on the object. ... if equals()) and you'd assign a new higher integer to each one. ... distinct objects that compare equal to have the same ID.) ...
    (comp.lang.java.programmer)
  • Re: Distinct ID Number Per Object?
    ... globally unique as the usual ... hashCode() on the object. ... if equals()) and you'd assign a new higher integer to each one. ... distinct objects that compare equal to have the same ID.) ...
    (comp.lang.java.programmer)
  • Re: equals and hashCode
    ... > I understand the purpose of overriding equals() in comparing the data of ... > an object verses the reference, but the requirement to override hashCode() ... > however unequal objects need not produce distinct hash codes." ... public int hashCode() { ...
    (comp.lang.java.programmer)
  • Re: Java HashSet Problem
    ... overwrite the hashCode() method. ... you need to ignore a critical piece of documentation. ... From the documentation for equals: "Note that it is generally necessary ... overriding equals without maintaining the hashCode contract incorrect. ...
    (comp.lang.java.programmer)
  • Re: HashSet is strange
    ... >>The real answer is that equals and hashCode are closely tied. ... > remove redundancy, so I wont be needing HashSet anymore. ... If your lists will always be ...
    (comp.lang.java.programmer)