where is .equals() method and how is it different from ==
operation <giving some confusing implementation> Is hashing
related to these?
Answer Posted / pavan kumar pathivada
The code by Namita works successfully but you need to make
certain changes to understand the concept.for every .equals
comparison in the code only two strings are considered
everytime i.e str and str3. Note that the hash code
functions also need to changed for str6 and str7.
anywys...great work namita...helped me a lot...thnks...
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How does arrays sort work in java?
How do I convert a numeric ip address like 192.18.97.39 into a hostname like java.sun.com?
What is contract between hashcode and equal method?
Can we assign integer value to char in java?
Can we overload final method in java?
How does finally block differ from finalize() method?
Why packages are used?
what happens when a thread cannot acquire a lock on an object? : Java thread
What is the right data type to represent a price in java?
Will the compiler creates a default constructor if I have a parameterized constructor in the class?
What is super keyword explain with example?
What is data member in java?
What Is Composition?
What are the benefits of operations in java?
What is the difference between the paint() and repaint() methods?