This is a duplicate of this Meta Stack Exchange question. Quoting from the answer there:
###Which answer should I choose?
Which answer should I choose?
- Don't hesitate to accept an answer that is well-written, suggests a good practice and works for you.
- Otherwise, even if there are answers that are good enough but that you're not entirely satisfied by, you might wait 24 to 48 hours to give other people a chance to give you a better answer. A question with an accepted answer isn't as likely to receive further attention as one without an accepted answer.
- Make sure that besides working for you, the answer is really good practice. Sometimes after the answer gets accepted, another comes in, uncovering the fact that previous one was in fact a bad hack.
- The bottom line is that you should accept the answer that you found to be the most helpful to you, personally.
Originally formatted there by Pops ♦.