Please explain in an easy to understand language or a link to some article.
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.
extendsis for extending a class.implementsis for implementing an interfaceThe difference between an interface and a regular class is that in an interface you can not implement any of the declared methods. Only the class that "implements" the interface can implement the methods. The C++ equivalent of an interface would be an abstract class (not EXACTLY the same but pretty much).
Also java doesn’t support multiple inheritance for classes. This is solved by using multiple interfaces.
now extending a class
in this case
Also, note that an
@Overridetag is not required for implementing an interface, as there is nothing in the original interface methods to be overriddenI suggest you do some more research on dynamic binding, polymorphism and in general inheritance in Object-oriented programming