This answer is a bad answer of which half the content is irrelevant. The question asks how to insert a string in the middle of another string (and notes that the asker wants to do this numerous times). The answer reads:
You don't need to loop it because the loop is already handled in main. So you just need to use String's substring function to reconstruct a String made of the first half of one, then the second, then the other half of the first.
How do I know the loop is already in main? Because I assigned you this homework.
The only relevant content here is:
use String's substring function to reconstruct a String made of the first half of one, then the second, then the other half of the first.
... which is already covered better in corsiKa's answer from a year earlier, which actually shows code that does this. However, the new, duplicate answer has received lots of upvotes due to being shared on /r/ProgrammerHumor, and has been accepted by the asker, perhaps because he found it funny.
What should we do with this?
Letting it stand unedited seems wrong. Half the content is irrelevant and confusing to anyone arriving on the page sincerely seeking an answer (since it starts off by talking about some loop in main that is definitely not present anywhere in the question). In normal circumstances, it'd be right to edit such content out.
But editing it out also seems wrong, since that conflicts with the intent of the answerer. This answer was never meant to actually help people arriving at the question looking for a solution, which corsiKa had already provided; rather, its purpose is to mock the asker for cheating on their homework. If we remove the mockery of the asker, then we remove the entire point of the answer - and the thing that it gained 200 upvotes for.
That leaves me thinking that the only unproblematic approach is to delete the answer. But when I flagged for deletion...
The only actually-relevant detail in this answer, for any new reader arriving here, is the suggestion to use
substring
, which is already covered in more detail in corsiKa's answer. It adds no value to the page and has been upvoted heavily purely due to irrelevant content (specifically, that the answerer recognises this as a homework task they set) and due to this post being linked from /r/ProgrammerHumor. Can we just delete it?
... I got declined:
In short, you're asking for the deletion of a post just because it got more upvotes than it should have received. Seems a wrong reason to delete a post, isn't it?
So, what should we do? It still seems to me that deletion here is warranted and I don't like just leaving it alone since it's a prominent broken window and a nuisance to that question's tens of thousands of viewers (or at least the subset of them who are sincerely seeking an answer).