LearnFrenzy
Sign in Take a free test

Constructors and the this Keyword · Constructors MCQ · Question 3

When the compiler adds a default constructor Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 3 Back to Exercise

When does the compiler provide a default (no-arg) constructor?

  • A Always
  • B Only when the class declares no constructors at all Correct
  • C Only for public classes
  • D Only when all fields are final
Correct Answer: Option B

Writing any constructor removes it.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links