Constructor invocation
Lesson 3 of 84 in OOPs Interview Mastery. Free to read, no account needed.
What a constructor is
Parameters set the fields
Overloaded constructors
Implicit default constructor
Chaining with this(...)
Constructors are not methods
Lessons in Objects and Classes Basics
- Class vs object
- Fields and methods
- Constructor invocation
- Reference variable vs object
- Private fields with getters
- Public vs private vs protected
- Package-private default access
- == vs equals
- Object identity vs equality
- Equals and hashcode contract
84 lessons across 9 topics. See the full course