When I first started coding about 3 years ago, I was infinitely frustrated by "crappy" answers in 250 rep posts due to the fact that the n00b in me didn't realize that you needed import lines.
Eg.
import java.awt.event.ActionListener;
I've had a bunch of discussion about this, and everyone says that I'm a sissy for wishing that people included import lines in their answers. What's wrong with it? Why do I get so much hate for requesting something that would take a few flicks of a track pad to get for the person answering, but could potentially cause half an hour of frustration on the asker's part? Whenever I answer questions, or whenever I see an answer that I can edit to include import lines, I try to do so.
It seems like common courtesy to me. It's like someone hands you a box with the answer in it, and the import line is the key to making it work, and they don't give you that for seemingly no reason. Is it just me, or does this get under anyone else's skin?
#include
s just to prevent the unavoidable follow-up comment "ur code dont work!!" Also recommended for single functions where you need to use an include not used in the original code. – usr2564301 Jan 8 '17 at 23:28