+ 2
when we compare String each others.... suppose we have declared two String variables when to use a.equal(b) and (a==b) ?????
2 Respuestas
+ 3
Use of .equal() method is the preferable way opposed to use of == operator whenever a comparison of content was the goal.
The == operator checks whether the two String shares the same reference, not content.