I have never used annotations in Java. I know they are new (may be introduced in Java 5). I just want to know their use. Can I use them in my simple Java classe for good reason or they are for some special tasks?
Thanks for sharing knowledge.
Printable View
I have never used annotations in Java. I know they are new (may be introduced in Java 5). I just want to know their use. Can I use them in my simple Java classe for good reason or they are for some special tasks?
Thanks for sharing knowledge.
I am not well equipped with "java annotations" knowledge but they are used in EJBeans for different reasons. For instance:
Code:import javax.ejb.Stateless;
@Stateless
public class HelloWorld implements HelloWorld {
public void greeting(String pName){
System.out.println("Hello " + pName);
}
}