Answered Questions

  • If A.equals(B) is true then A.getHashcode & B.getHashCode must always return same hash code

    A) TrueB) False

    ViBi

    • Apr 19th, 2015

    Two objects that are equal return hash codes that are equal. However, the reverse is not true: equal hash codes do not imply object equality, because different (unequal) objects can have identical hash codes

    https://msdn.microsoft.com/en-us/library/system.object.gethashcode%28v=vs.110%29.aspx

    regex

    • Apr 7th, 2015

    It is clearly false. Proof: "c class MyClass { public int _id; public MyClass(int id) { _id = id; } public bool Equals(MyC...