This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I wrote the above program. Output is true and false. Why for line# 1 output is true. Since Dog class does not implement hashCode and Equals method, Object's class hashCode will be used which returns different no for any input value. So, search in bucket different from where the elementwas stored should lead to element not found. Please tell where I am wrong. Thanks, Garima