0
Why we use @override in function overridin?
2 Answers
+ 1
This annotation only checks for a override condition (base class have function with same signature) and prevent your compilation when it needed
You can write your overriden function without this annotation, but if you make a mistake (for example, in function return type), you will be never notificated
+ 1
It's an annotation. It's like a public announcement, "Hey guys. I'm overriding this method to give it new functionality. Don't shoot me please, I'm changing the original implementation."