<<Previous Question <<1500 Plus Interview Questions>> Next Question>>
What is the difference between equals and == operator in Java?
Watch the answer for this Selenium Interview Question in a detailed manner in the below youtube video:
Note: Don’t forget to subscribe to my Youtube channel here: Click here
Notes used for explanation in this Youtube video are provided after the video:
Notes used in the above Youtube Video:
The following are the differences between equals() and == operator in Java:
- > equals() is a method and == is an operator
- > In the case of comparing objects, equals() method is used for content comparison whereas == is used for object reference comparison (Object address comparison)
- > On the other hand, == is basically used to compare the values and not to compare the strings
- > We have to use equals() methods while comparing the Strings
Next Steps:
- > For more Selenium Interview Questions and answers, continue to the next post (Click on Next Post link below)
- > Check complete Selenium Interview Questions list here (Click here)
Please leave your questions/comments/feedback below.
Happy Learning ?
<<Previous Question <<1500 Plus Interview Questions>> Next Question>>