I know what it means in a comment for documentation purposes, but outside of that what does it mean? (I would normally just google this but every non letter symbol shows up
As some other suggests, it is Java's annotation. It helps the compiler to validate your code and to notify the programmer as well.
Very simple code example:
public class SomeClass {
@Override
public String toString() {
return "SomeClass";
}
@Deprecated
public void doSomeOperation() {
// some operation...
}
}
The annotation from SomeClass#toString
which is @Override
helps the compiler to determine that it is an overridden function from the implicit inheritance to the class Object
.
While the annotation from SomeClass#doSomeOperation
will warn the programmer that the function itself is deprecated already and should be avoided to use.