Possible Duplicate:
What's “@Override” there for in java?
I’ve never put “@Override” before a method until now. I see some code examples with it, but I don’t understand its utility. I’d love some explanation.
Many thanks,
JDelage
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.
First, you can’t annotate a class with
@Override. This annotation indicates that a method declaration is intended to override a method declaration in a superclass.You don’t have to annotate overriding methods but if you use this annotation and your annotated method does not override a superclass method, then the compiler will generate an error message.