A constructor is called Default Constructor when it doesn't have any parameter. Syntax of default constructor:
In the below example, we are creating the no-arg constructor in the Bike class. It will be invoked at the time of object creation.
Output:
Example of default constructor that displays the default values.
Output
In the above class,you are not creating any constructor so compiler provides you a default constructor. Here 0 and null values are provided by default constructor.