Solutions for Class 10 ICSE Logix Kips Computer Applications with BlueJ Java | IT Developer <?php echo $page_title; ?>
IT Developer

Constructors in Java

Chapter 11

Constructors in Java

Class 11 - Logix Kips ICSE Computer Applications with BlueJ


Share with a Friend

Multiple Choice Questions


Question 1

A member method having the same name as that of the class is called ............... .

  1. an alias
  2. a friendly method
  3. a constructor
  4. a protected method

Answer

a constructor

Reason — A member method having the same name as that of the class is called constructor.

Question 2

A constructor has ............... return type.

  1. a void
  2. more than one
  3. String[] args
  4. no

Answer

no

Reason — A constructor has no return type.

Question 3

A constructor is used when an object is ............... .

  1. created
  2. destroyed
  3. assigned a value
  4. abstracted

Answer

created

Reason — A constructor is used when an object is created.

Question 4

A default constructor has ............... .

  1. no parameters
  2. one parameter
  3. two parameters
  4. multiple parameters

Answer

no parameters

Reason — A default constructor has no parameters.

Question 5

Pick the correct answer.

  1. A constructor has exactly the same name as its defining class.
  2. A constructor method does not have a return type.
  3. A constructor can be invoked only via the new operator.
  4. All of the above

Answer

All of the above

Reason — All the statements are correct.

Question 6

In constructor overloading, ............... .

  1. All constructors must have the same name as that of the class.
  2. All constructors must have the same number of arguments.
  3. All constructors must have arguments of type String[] args.
  4. All constructors must have no arguments.

Answer

All constructors must have the same name as that of the class.

Reason — In constructor overloading, all constructors must have the same name as that of the class.