examples of parameterized constructor
Answers
Answered by
1
Answer:
For example, when we create the object like this MyClass obj = new MyClass(123, "Hi"); then the new keyword invokes the Parameterized constructor with int and string parameters (MyClass(int, String)) after object creation.
Explanation:
If you are satisfied with my answer, then give me 5 stars and follow me
Similar questions
English,
2 months ago
Chemistry,
2 months ago
Social Sciences,
2 months ago
Chemistry,
5 months ago
Math,
9 months ago