The number of parameters passed in default constructor is?

By Anjnee Bhatnagar|Updated : June 29th, 2022

The number of parameters passed in default constructor is?

  1. One
  2. Two
  3. No
  4. Three

Answer: Option C. No

The number of parameters passed in the default constructor is zero. No parameters can be passed in the default constructor.

Solution

The answer to the above question is zero or no parameters. We cannot pass parameters to a default constructor. The only purpose of a default constructor is to instantiate the object. However, it can contain default arguments along with default values.

☛ Related Questions:

Comments

write a comment

Follow us for latest updates