linrio / linrio.github.io

Lin Blog ->
http://linrio.github.io
0 stars 0 forks source link

java, compare two Strings #8

Open linrio opened 7 years ago

linrio commented 7 years ago

In java, if we want to compare two string, such as A= 'abc' and B = 'abc', we should use: if(A.equals(B)){} . It return true orfalse.
Not if(A == B) It return the whether the memory address is the same.