Default constructors are not mandatory to be written by user, explain the situation when default constructor is mandatory to be written by user.
Answer: If user doesn't declare constructor in the class, compiler assumes that default constructor will be used, however if user declare parameterized constructor and want to use default constructor also, user must declare default constructor explicitly.
Comments
Leave a comment