Constructors have the same name as the class and no return type. They run when an object is created.
← Core Java theorytheory 0/50 · 0%
OOP · easy
9. Constructors
Special methods for initialization.
Check your understanding
1. Default constructor has how many parameters?
2. Can a class have multiple constructors?