InterviewSolution
Saved Bookmarks
| 1. |
How Will You Find If Two Strings Are Same Or Not? |
|
Answer» TWO STRINGS in JAVA can be compared using the equals () method and not ==. Using == to compare strings will compare if the two string variables POINT to the same instance of a string object and not the ACTUAL value of the strings. Two strings in Java can be compared using the equals () method and not ==. Using == to compare strings will compare if the two string variables point to the same instance of a string object and not the actual value of the strings. |
|