where is .equals() method and how is it different from ==
operation <giving some confusing implementation> Is hashing
related to these?
Answer Posted / tanuj
== operator return true if both reference variable pointing
to same object.
equals() method also use == as default, but String and
Wrapper classes override (you can also override) it but
meaningfull comparison , as in two same String case it
returns true for equals()method.
for knowing it clearly make small programs by using both.
there are so many exception in wrapper classes.
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is the size of integer?
What are different types of states exist for a thread?
What is a bufferedreader?
What package is math in java?
what is optional in java 8?
What is the purpose of javac exe?
Write a program to find the greatest of three numbers in java?
What is rmi and steps involved in developing an rmi object?
What is static and final keyword in java?
Can you inherit a constructor java?
What is equals method in java?
What is static variable with example?
Difference between Linked list and Queue?
What are 5 boolean operators?
What is meant by distributed application? Why are we using that in our application?