multiple constructors in same class

My code work if I do not implement
in main. But I need to set the values into the constructor. What is the proper way to pass values to a constructor?
Last edited on
When you create the new objects using the constructor, don't just put int or string in the parenthesis. You need to put a integer value or string value for constructors to work. So don't create the objects beforehand. Just create an object when the number/string is given.
Last edited on
Topic archived. No new replies allowed.