English

The compiler supplies a special constructor in a class that does not have any constructor. - Computer Applications

Advertisements
Advertisements

Question

The compiler supplies a special constructor in a class that does not have any constructor.

Options

  • True

  • False

MCQ
True or False

Solution

This statement is True.

Explanation:

The Java compiler generates one if a class does not have an explicit constructor. This default constructor sets the object's values to their defaults. However, if the programmer defines a constructor directly, the compiler will not provide a default constructor.

shaalaa.com
  Is there an error in this question or solution?
Chapter 7: Constructors - EXERCISES [Page 418]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 7 Constructors
EXERCISES | Q III. 1. | Page 418
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×