can we make any class to behave as interface and so that we can write “implements” in place of “extends” while creating any child class of that class .what is the actual difference between “implements” and “extends” internally .
Share
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.
An
interfaceis like a blueprint. It doesn’t define any behavior. Hence when you say extends in the context of an interface it means you are extending the blueprint but not adding behavior. Conversely, when you say extends in the context of a class it means you are adding/modifying the behavior. When you say implements it means you are going to provide something that has behavior i.e. aclass