Question OOP-CTOR-0005
EasyWhat is a parameterised constructor?
- A.
A constructor that takes arguments to initialise the object
- B.
A constructor that returns a value
- C.
Show answer and explanation
Answer: A
For example, Point(int x, int y) sets the coordinates when the object is created.