+ 4
Annotations
'@' Can please anyone tell what does this '@' this do and how do I use it in java.
4 Respostas
+ 7
The title actually answers the question. @ is an annotation. Meaning that it is added text for you or the compiler to enforce whatever you want to happen, will happen. The classic example, also given in the link provided by @KINGDX is Override.
@Override is used before overriding a method. Why?
It tells you this method is going to override a method in some extended class. It will also force the compiler to throw an exception (an error) if the method is NOT overriding anything. This is exactly what you want, because if there's an error you know right away it's not working properly. The programs functionality does not change by using this @Override, again it's just an annotation for you and the compiler before run time.
+ 11
I was just reading about this the other day! It's a system for making notes or specifying some behavior. For instance, you can mark your overrides of inherited methods, suppress warnings (caution with that one, though), or even set up certain configurations (I've seen it most related to beans, myself).
With luck, we'll draw an expert to give us more info, but I hope this is of some use.
+ 5
This should help you :
http://stackoverflow.com/questions/31822020/in-java-what-does-the-symbol-mean
+ 2
Thanks guys