I've always used == to compare strings until now. I ran into an error, so I decided to change one of the equals signs to .equals() and this solved my problem. Why didn't == work? Are there cases where == should not be used and .equals() should be used instead (obviously aside from fixing the bug.) I'm not sure I really see a difference between the two operators. What's the difference?
sort by best latest
You can help the HubPages community highlight top quality content by ranking this answer up or down.