what is the difference between equals method and ==

Answer Posted / upendar

== checks wheather two strings are pointing to same location
or not.

equals method checks wheather the strings are same or not

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a functional interface?

549


How do you include a string in java?

526


What is the purpose of default constructor?

584


What is a short in java?

504


Explain about the security aspect of java?

579






Can main() method in java can return any data?

652


Explain the differences between abstraction and encapsulation?

525


What do you mean by checked exceptions?

542


How many threads can java run?

563


What is finally and finalize in java?

598


What is a variable declaration?

531


What are measurable parameters?

571


What are adapter classes?

606


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

567


Why do we need hashset in java?

506