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
Does sprintf add a null terminator?
What is collection class in java?
What do you understand by the bean persistent property?
What is the difference between yielding and sleeping?
What is java used for?
What is the synonym of procedure?
Does windows 10 need java?
What are daemon Threads in java?
I want to print “hello” even before main is executed. How will you acheive that?
Is singleton class immutable?
What is exception in java?
What is set and get methods in java?
What are the application of stack?
What is the use of bufferedreader?
What are the four corner stones of oop?