Question OOP-CTOR-0028
EasyA Java class defines only a constructor that takes a String. Does the compiler still add a no-argument constructor?
- A.
Yes, always
- B.
No
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Constructors and Destructors question
A Java class defines only a constructor that takes a String. Does the compiler still add a no-argument constructor?
Yes, always
No
Sign up free to see the answer and a step-by-step explanation.
Only if the class is abstract
Only if the class is public