Possible Duplicate:
Xml configuration versus Annotation based configuration
Can some one let me know what are the main advantages of java Annotations over Xml, i heard meta meta always while searching about this in google, what that meta.
Thanks a lot.
Meta data is some kind of description that you can supply along with your data. In java its possible to do with annotations, XML, there are other methods.
In order to take advantage of meta data you should have something that will process this data and decide what happens once the meta data is recognized.
Annotations have a lot of advantages over XML, to name a few :
Static type checking - the compiler will check for you where the annotation (once defined properly) is applicable and how
Clean code - its much easier to see (visually) the meta data defined in annotations
However it comes at a price:
Hope this helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With