Ok I will explain you the concept of annotation in EJB 3 with the help of below EJB example. This is a simple EJB for validating credit card number.
Here we are using two annotations. Stateless and Remote. These annotations will be first processed by a program called annotation processor that can read a
Java program and take actions based on its annotations. So these annotions are nothing but the instructions to the EJB container. EJB container gives special treatment to this class becoz of the annotions.