public class A extends B implements C {
}
Class B and interface C have the same member function name(not the same signature).
This code can’t be compiled. How can I solve this?
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.
The inherited class implements your interface method, so there should not be an error. In fact, both having the same name is really the idea of implementing an interface…
Here’s a check list:
override. Same rules apply regarding the signature.final.