Skip to content

Commit ac2ba0a

Browse files
committed
Update equality.md
1 parent f1c8a32 commit ac2ba0a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/strings/equality.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ boolean areNotSame = !bow.equals(wow);
3131
IO.println(areNotSame);
3232
~}
3333
```
34+
35+
Note that you should **not** use `==`. Java will let you do it but you won't get what you expect.[^inaway]
36+
37+
[^inaway]: It is confusing in a way that we aren't ready to explain yet. Just remember for `int`, `double`, `char`, etc. you can use `==`. For `String` use `.equals`.

0 commit comments

Comments
 (0)