1

I asked a question and got two answers. They provided examples and those examples seemed to work fine. But somebody downvoted both the answers.

They had provided relevant, good answers, and had put efforts to explain with an example, so it was my job to upvote them, and I did.

But then I had to post my problematic code. And my question started to get downvoted. I did post a comment asking them to at least tell the reason.

I want to know the reason.

6
  • 1
    See Enable Optional Anonymous Reasons for Downvotes on Questions.
    – user456814
    Jun 18, 2014 at 5:37
  • 7
    The first question you're asking here is totally fine. The second proposal is technically acceptable, but 100% guaranteed to attract downvotes. That has been suggested repeatedly, and repeatedly rejected. It isn't going to happen. I suggest focusing on the real problem and editing that part of your question out. Jun 18, 2014 at 5:39
  • I think this was the question being referred to, but I'm not sure, since it wasn't included in the Meta question: String: How to insert double quotes around all occurrences of a character.
    – user456814
    Jun 18, 2014 at 5:42
  • 4
    Upvoted this question, nothing wrong with it. Jun 18, 2014 at 7:27
  • 2
    "Why was my question downvoted" without a link to the question is the exact same kind of problem as "why doesn't my code work?" without enough code. -1. The fact that someone answered by guessing what your code looks like or guessing which question you're talking about is irrelevant.
    – Wooble
    Jun 18, 2014 at 10:48
  • @Wooble This question!
    – Solace
    Jun 18, 2014 at 10:50

1 Answer 1

7

The first revision of your question lacks enough information to understand what is wrong. Most coding problems start with some input, one or more operations and output. You only show us the operation and some vague language about truncation. The tooltip on the downvote button says:

This question does not show any research effort; it is unclear or not useful

and the unclear reason fits the bill so one downvote seems appropiate at that time of writing not to mention that I expect your problem with replaceAll might be already answered somewhere.

The helpcenter as well as this post has guidance on good question writing.

The downvotes on the answer might be explained by the fact that both posts mention that there is no problem with your code. These type of questions can be closed for that reason. At least one poster had the privilege to do so but instead posted an answer. The other poster could have flagged your question.

I'm not a java dev but the answers seem technically OK to me....

Remember that everybody picks-up a downvote now and then. Looking at your questions you seem to do fine, don't spend too much time on those incidents.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .