syntax - Java - what is "@Override" used for? -


possible duplicate:
what's “@override” there in java?

i've never put "@override" before method until now. see code examples it, don't understand utility. i'd love explanation.

many thanks,

jdelage

first, can't annotate class @override. annotation indicates method declaration intended override method declaration in superclass.

you don't have annotate overriding methods but if use annotation , annotated method does not override superclass method, compiler generate error message.


Comments

Popular posts from this blog

SAP Web Service from .NET via WCF -

Optimized Line drawing in QT -

datetime - str to time in python -