Getting Started with Java
This is a 100% free course, but we need you to first join or login to watch this video.Alright, join or login here.
This video introduces the concept of constructors in Java. Constructors are special methods are called when you create an object. They have the same name as the class and don’t have any return type, not even a void. They can be overloaded to accept different number or types of arguments. If you don’t provide a constructor for your class, the default constructor is automatically provided by Java for your class. If you provide a default or any other constructor, java uses your constructor instead of the default one.