Why Annotations in JAVA
Annotations are generally used to embed in a program data that would otherwise be furnished in a deployment descriptor. With annotations, you put the specification information in your code next to the program element affected. More so it also simplify development by providing a common foundation for the various kinds of components in the Java EE platform.
Benefit of Annotations
- When there is more annotations , there will be less XML deployment configuration
- Simplify development
- Leads to more Plain Old Java Object ( POJO i.e no inheritance , polymorphism etc)