Q. If the default constructor is not defined, how will the objects of the class be created?

  • (A) An error will occur at runtime.
  • (B) The compiler will generate an error.
  • (C) The compiler provides its default constructor to build the object.
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (C) The compiler provides its default constructor to build the object.
Explanation: If we define our own constructor, the compiler does not create the default constructor.
Explanation by: Dharmendra Sir
If we define our own constructor, the compiler does not create the default constructor.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
205
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Dharmendra Sir
Publisher
πŸ“ˆ
95%
Success Rate