constructor
Also written: constructors
The code that creates an object and sets its fields, like MenuItem(this.code, this.name, this.cents).
Also written: constructors
The code that creates an object and sets its fields, like MenuItem(this.code, this.name, this.cents).