If I have three classes
class A
class B extends A
class C extends A
Would using abstract classes or interfaces give me any type of errors or affect the way I implement the program?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unless you need to share implementation, favor interfaces.
If you need to share implementation, think carefully if an abstract class is the right way to accomplish this.
Inheritance is a powerful tool, but can easily create an unmaintainable mess (I have been guilty here).
But to answer your question – no, there is nothing inherent in this setup that would cause an “error”.