This is a hint for the compiler to let you know that you are overriding the method of the parent class (or interface in Java 6).
If the compiler detects that there is no function to override, it will warn you (or an error).
This is extremely useful for quickly spotting typos or API changes. Suppose you are trying to override the method of the parent class harvest() , but conjure it with harvset() , your program will silently call the base class, and without @Override you will not have any warnings about it.
Similarly, if you use the library and in version 2 of the library, harvest() been modified to accept an integer parameter, you can no longer redefine it. Again, @Override will quickly tell you.
EboMike Dec 03 2018-10-12T00: 00Z
source share