hamburger

The number of parameters passed in default constructor is?

By BYJU'S Exam Prep

Updated on: September 25th, 2023

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:

Our Apps Playstore
POPULAR EXAMS
SSC and Bank
Other Exams
GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com
Home Practice Test Series Premium