why not equals() ? i tried so manny times thinking I was supposed to use equals to compare?? please
why not equals?
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
1 November 2022, 15:25useful
I don't have access to the task so don't know what the requirements are, but the task is named "Comparing strings by reference" which to me sounds like they don't want you to compare the values of the Strings but instead the reference (memory locations) which can be compared with '==' and not '.equals()'
+1
Anonymous #11149234
3 November 2022, 19:54
thank you thats what it was!!
0