I am confused while understanding this Annotation. i don’t know what is the use of this Annotation. Please help me in Understanding the concept of @Override annotation.
What i have Tried
i already search on google about this annotation but nothing found Helpful.
i contacted many developer about this annotation but Still not found something.
What i know about this annotation
According to me, i know that it is used to call a method which is already created in another class which needs extend or import. And it have also a Super() method to pass the method’s parameters.
Notice
I know this type of Questions need to be ask on StackOverFlow . But my Account is on hold because of I ask a Question which needs more information.
Hope anyone help me in understanding this Annotation.
@ Override @ Override annotation informs the compiler that the element is meant to override an element declared in a superclass. … If a method marked with @ Override fails to correctly override a method in one of its superclasses, the compiler generates an error.
We use @Override in Java because it instruct the compiler that we are overriding the method. If we don’t use the @Override, then the sub class method may behave as a new method in sub class(also called as child class).