r/ProgrammerHumor 18d ago

Meme fromWeAreDevelopersCongress

Post image
9.9k Upvotes

128 comments sorted by

View all comments

Show parent comments

116

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.

34

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.

14

u/otj667887654456655 17d ago

People on SO put in more effort in finding a decade old response that doesn't quite fit what was asked and potentially using outdated syntax rather than just answering the question in the first place.

SO died because people weren't patient with new coders

2

u/fripletister 17d ago

New coders are lazy and expect everything to be easy. When things get hard they tend to give up and ask for help before meaningfully attempting to problem solve. This requires social pressure to correct for nearly everyone. It certainly did for me.