This question is getting some bad votes. I have corrected it several times and have learned a lot from it but it is not improving people's perception of it. I hope you can help me understand how I can make it better or what I did wrong.
What is meta?
- Any Stack Exchange user can ask a question
- The community provides support, votes on ideas, and reports bugs
- Your voice helps shape the way Stack Exchange operates
closed as off-topic by CRABOLO, Emrakul, gnat, Doorknob, Martijn Pieters Jan 21 '15 at 22:16
This question appears to be off-topic. The users who voted to close gave this specific reason:
The original error message told you exactly what to do, but you asked a question on StackOverflow instead; that gained some downvotes, I imagine. Then you edited to say that the solution that every reader knows is correct "did not help", which is quite frustrating, since of course we all know it must help, and that surely earned some more downvotes.
I think unfortunately the truth is that there's a certain level of question that can't be made into a good question; this is very basic programming language material, and questions like this just aren't appropriate on StackOverflow. I would say that a good rule of thumb is that you can't ask for help with anything you would learn in the first few chapters of an introductory textbook on a language.
I guess the question is getting down-votes because it doesn't show any search effort, and/or it is not useful to future readers.
What you should have done was said in the error message, and you don't report what happened when you tried adding the constructor; you say, "it did not help" without saying what exactly happened, and in which way what you get was different from what you expected.