ICSE Class 10 Computer Applications Question 18 of 30

Solved Sample Paper 1 — Question 18

Back to all questions
18
Question

Question 1(xviii)

Read the following text and choose the correct answer:

Java constructor overloading is a technique in which a class can have any number of constructors that differ in parameter list. The compiler differentiates these constructors by taking into account the number of parameters in the list and their type.

Why do we use constructor overloading?

  1. To use different types of constructors.
  2. Because it's a feature provided.
  3. To initialise the object in different ways.
  4. To differentiate one constructor from another.
Answer

To initialise the object in different ways.

Reason — Constructor overloading is used to initialise the object in different ways. A user can create multiple constructors for a class with different signatures based on the number and type of arguments.