2075 6

CSC419 ยท 2075 ยท 5 marks

Define the chain of constructor. What is the purpose of private constructor?

Define the chain of constructor. What is the purpose of private constructor? [5]

Advanced Java ProgrammingChapter 1: Programming in JavaClass and Object

--- Constructor chaining is the process of calling one constructor from another constructor within the same class or from a parent class. This creates a "chain" of constructor calls that executes in sequence. Constructor chaining is achieved using: - this() keyword -- to call another constructor ...