4

I saw a late answer, and that answer did not add anything that previous answers had not already said. If the question had no answer, it would be somewhat useful, but now it doesn't add anything.

The question as this one: What is the difference between cloning the object with .clone() method and = sign?

Is that a reason to downvote or flag?

In case the link gets changed, it was like this:

Question:

I am really confused about what is the difference between .clone() method or simply putting the = sign between objects while trying to clone it.

Old answer:

The = sign is the assignment operator in java. Having a = b means "I assign to the variable a the value of variable b. If b is an object, then a = b makes a point to the object that b is pointing to. It does not copy the object, nor clone it.

If you want to clone an object you either have to do it by hand (ugly), or have to make the class that has to be clonable to implement Clonable then call clone().

The advantage on clone() over the "ugly" way is that with clone() it's the developer of the class to be cloned that defines how cloning has to be done in order to ensure that the copy is a legit and working copy.

New answer:

'=' creates a new reference to the same object. 'clone()' creates a new physical object with the same attributes as the earlier one

7
  • Do you find the new answer useful? Does it add value? What does the tooltip say when you hover the DV button beneath the answer? May 26, 2017 at 22:59
  • It is useful on its own, but it does not add value.
    – klutt
    May 26, 2017 at 23:01
  • 4
    If it doesn't add value it's not useful but just noise IMO. May 26, 2017 at 23:06
  • Sounds sensible.
    – klutt
    May 26, 2017 at 23:12
  • Here are some additional hints. May 26, 2017 at 23:13
  • 2
    why is the solution to flag something? Just downvote snd move on May 26, 2017 at 23:48
  • I don't know. That's why I asked. :)
    – klutt
    May 27, 2017 at 0:23

2 Answers 2

13

Downvote

If you see an answer that is an answer, does not have any severe content or formatting problems, does not exist solely to promote a product or service, and is not rude or abusive, but just doesn't add any useful information you should downvote it. You should do this regardless of the age of the question and answer.

5
  • "You should do this regardless of the age of the question and answer." Then why shouldn't we downvote the older ones who already said the same things as this new one ?
    – Kaiido
    May 27, 2017 at 4:16
  • @Kaiido If you notice any answer that doesn't add anything useful, then you should downvote it. Upvote high quality useful content and downvote low quality content without regard to the age of the content. That is the purpose of the voting system.
    – user4639281
    May 27, 2017 at 4:22
  • 2
    My point was just that in the case exposed in OP, the newest answer doesn't add anything new. This is actually the exact case where TimeStamp is important.
    – Kaiido
    May 27, 2017 at 4:44
  • Maybe just maybe try ignoring it? or upvoting both, why being cynical? And if you fear people abusing the system only then downvote. abusing as in lots of users posting same answers over and over again. May 27, 2017 at 5:01
  • I do think the timestamp matters a bit. When a question is new, it's very natural that answers of different quality arises. However, months or years after a question has been answered, one can expect people to read previous answers first.
    – klutt
    May 27, 2017 at 10:39
5

In general, answers that don't contribute anything should be downvoted. If the answer has a legitimate, helpful approach that's simply overshadowed by a truly excellent answer, it may or may not be worth upvoting (you can and should upvote multiple really good answers to the same question, without trying too hard to nitpick which is slightly better), but it's probably not downvote material.

However, if two conditions are true, it's probably deserving of a downvote. The first is that the answer is pretty lackluster and wouldn't get an upvote normally; the second is that there are other answers that were clearly already present before the answer was drafted that correctly cover all the same ground and are reasonably concise already. In this case, the answer has no reason to exist: it adds nothing to the set of answers already there and was either added carelessly, or in bad faith. Either way, it should be downvoted.

There's a bit of an exception to this rule of thumb, though, and that's if the other answers aren't very concise and this one is. An answer that does an excellent job of summarizing the main points of the explanation with far less verbiage than its competitors without leaving confusing misconceptions can be quite worthwhile to have as an alternate viewpoint, and shouldn't be downvoted. In fact, consider upvoting it.

The classic downvote case is where the accepted, upvoted answer from three years ago says something like "Do X;Y;Z;, because X frobs the widget, Y gadginates it, and Z takes the frobbed gadget to do what you want (A and B) without side effects (C)", and another answer comes along saying in effect "Do X;Y;Z;". This isn't a summary. It's just a chopped-off repetition, since there's nothing there that can't be gained from simply copy-pasting the code blocks from the other answer.

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