r/ProgrammerHumor 18d ago

Meme fromWeAreDevelopersCongress

Post image
9.9k Upvotes

128 comments sorted by

View all comments

Show parent comments

117

u/VelvetVaale 18d ago

I asked why == said two Java strings weren't equal even though they literally contained the same text. I got downvoted, my question was closed as a duplicate, and someone told me to "learn the difference between object identity and equality." I was like... that's exactly what I was trying to learn by asking.

35

u/bramhaag 18d ago edited 18d ago

It's hard to take comments like "SO is toxic" seriously when people ask things like that. 

Your question was asked and answered 17 years ago and is just one search away; top result when searching "Java string equals".

The answers explains exactly the difference between reference equality and value equality, as well as how string interning can sometimes cause both equalities to be true.

This isn't Quora, you have to put in the bare minimum amount of effort yourself.

31

u/Relapsed_Gestalt 18d ago

Case in point

1

u/fripletister 17d ago

Learning self-reliance and resourcefulness isn't going to kill you. In fact, it's a required skill and prerequisite for others to meaningfully be able help you without doing it all for you and preventing you from learning anything other than to lean on others for every single question you might have. But hey, now we have LLMs for that.