Editing an answer should only be done to improve an answer. It should not be done to change the content of an answer, i.e. if the user recommends using an Array
, it is wrong to edit it to say ArrayList
. The author's intent should be maintained when an answer is edited, even if it's wrong, or not as good as the correct answer.
That's not to say that nothing should be done with the answer, even if it's not as good as the answer you found most helpful. If the answer is helpful, you do have the discretion to upvote it as a possible answer, even if it isn't the best answer.
If a comment is a link-only answer as you've posted, you should explain the answer and expand on it so that it qualifies as an answer, because link-only answers are undependable and grounds for deletion/editing.
Original comment:
This may help: What do you do when the only answer to your question is not as helpful as one of the comments on the question?
can be converted into an answer:
The comment provided by @Compass (What do you do when the only answer to your question is not as helpful as one of the comments on the question?) help solved the issue.
The link points out that editing an answer that changes the author's intent is not a good course of action and instead recommends that a new self-answer be written. The self-answer should strive to be a quality answer that is not link-only, and give credit to the original comment writer.