Skip to content

Instantly share code, notes, and snippets.

@eqrw105
Last active October 19, 2019 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eqrw105/626acef4a9393b79fc8b2e43e10f3be8 to your computer and use it in GitHub Desktop.
Save eqrw105/626acef4a9393b79fc8b2e43e10f3be8 to your computer and use it in GitHub Desktop.
문자열 비교
userID 의 값 = "abc"
useridTr 의 값 = "abc"
==연산자로 비교를 했더니 계속 false가 나오는 것
userID == useridTr -> false
userID.equals(useridTr) -> true
equals -> 내용을 비교
==연산자 -> 주소값을 비교
문자열 비교에서 equals의 중요성을 알았다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment