Q. Which method is automatically called when a new object is created?

  • (A) constructor
  • (B) init
  • (C) create
  • (D) build
πŸ’¬ Discuss
βœ… Correct Answer: (A) constructor
Explanation: The constructor() method is automatically invoked when an instance is created.
Explanation by: Mr. Dubey
The constructor() method is automatically invoked when an instance is created.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
91
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
88%
Success Rate