How to print duplicate values using parameterized constructor
The members of a class can be initialized using a constructor. This can make the members of a class accessible outside a class. A parameterized constructor has arguments passed to it. Duplicate values can be printed when many instances of the class are created and the same values are passed to them. Then a function can be used to print the values.
Comments
Leave a comment