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
Explain naming conventions for packages?
List two java ide’s?
Give the difference between the println method and sqrt method?
what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread
What is off heap memory?
How to sort double array in java?
What are the different types of garbage collectors in java?
What are advantages of exception handling in java?
what is the difference between preemptive scheduling and time slicing? : Java thread
Is singleton set an interval?
Can an integer be null java?
What are the differences between include directive and include action?
Why java is made?
Does sprintf add a null terminator?
Which is better 64 bit or 32 bit?