Default Constructor in Java

Default constructor is automatically created by the compiler if we do not declare any constructor. The features of default constructor are : Let us look at an example to understand default constructor: Output As you can see in the above code we have not created any constructor in our class TestA, still instance variables age … Read more