I had a discussion with Luiggi MendozaLuiggi Mendoza in this questionthis question:
I am trying to create an empty collection but apparently collections.emptySet() is apparently not the way? Google tells me to create a new instance instead... How do I create a new instance of a collection?
My opinion is we shouldn't answer this question in order to mantain SO quality and encourage OP's to make better questions so:
- I downvoted it,
- flagged as too broad
- leave this comment:
start here docs.oracle.com/javase/tutorial/collections – Jordi Castilla
All in order to guide OP's to a collection tutorial, as the question itself notes (IMHO) a lack of understanding the basis or even investigating a bit.
Then, few minutes after, appeared this answeranswer
NOTE THE END OF THE ANSWER
In the future, please refer to the documentation first.
As I'm not agree with that, I left this comment on Luiggi's answer:
don't encourage this questions with answers.... :( – Jordi Castilla 48 mins ago
Then, discussion started:
Luiggi: @JordiCastilla if you read the question, OP's mainly asking why Collections#emptySet won't work as expected. And IMHO the names of those methods are confusing, by the way :), I think they should be Collections#emptyImmutableXyz. – Luiggi Mendoza 46 mins ago
Jordi: I am trying to create an empty collection but apparently collections.emptySet() is apparently not the way? this means OP didn't take any effort of reading about Collections either Java basic object management. – Jordi Castilla 43 mins ago
Luiggi: @JordiCastilla I know, and sadly there's lot of people that won't and comments won't make them do that either. So, you can choose to help OP with a proper answer or just downvote, comment and leave. I don't worry about earning/losing rep with this post, just solving OP's issue. – Luiggi Mendoza 41 mins ago
Jordi: solve OP's issue is to guide through a tutorial to start with the basis... code you posted will solve OP's concrete question? YES but I bet OP's wont understand what he is doing. PS: i either worry about losing rep's with this question, I'm worried about SO quality. – Jordi Castilla 31 mins ago
Luiggi: @JordiCastilla I'm worried too, but I don't see you contributing either. And that's not a dup q/a, read it well. If you feel this is a bad q/a, create a question on meta about it. – Luiggi Mendoza 30 mins ago
Jordi: Of course you won't see me contributing with OP here, I'm doing it by giving you my opinion... And... think about why a question has 5 downvotes and if it's me or you who must create a meta post to defend position – Jordi Castilla 8 mins ago
Luiggi: @JordiCastilla whatever, I'm not arguing here in comments w/you anymore. – Luiggi Mendoza 1 min ago
As Luiggi has much more reputation and experience in SO than me, maybe I misunderstood some part of asking good quality questions, and flag bad quality ones or maybe the question or the OP's intention itselfs...
What do you think?