Hello! Tell me pliz what is the difference between the function of comparing strings equals and contains ???
- 2I'm not familiar with java, but in my opinion, it is obvious from the title that contains should not compare strings - DreamChild
- 2Have you tried javadoc? - a_gura
|
1 answer
"text text".equals("text") // false "text text".contains("text") // true Equals - whether the strings are the same.
Contains - whether one line contains another
- fourwe can add that mathematically: equals (x, y) = x.contains (y) and y.contains (x) - KoVadim
- fiveIt is possible and not mathematical. Lines "Went" and "Went to $% #!" The second one contains (contains) the first, but not equivalent to it - alexlz
|