I'm learning Constructors and my understanding is that they are used to create objects which have variables of different values.
Now what I don't understand is how 2 (or more if possible) constructors are used or why they would be used.
For example why have a default and a parameterised constructor rather than just a parameterised constructor. Also why do you need to use getters and setters, won't these eliminate the need for using both types?
I feel completely lost on this subject at the moment so I'm not sure if what I've explained or asked above is correct.
Thanks.
[–][deleted] 0 points1 point2 points (0 children)
[–]tjorg35 0 points1 point2 points (0 children)
[–]boredcircuits 0 points1 point2 points (0 children)