aspose file tools*
The moose likes Java in General and the fly likes help on annotations . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "help on annotations ." Watch "help on annotations ." New topic
Author

help on annotations .

suneel kumar
Ranch Hand

Joined: Jan 08, 2007
Posts: 46
Hi all,
i want to know the small program in java by using the annotations..
.. i am using jdk1.4.
is it possible to annotations ?
Ajay Singh
Ranch Hand

Joined: Dec 13, 2006
Posts: 182
NO. annotations came in java 5.
This would a good start to learn about them: http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 13884
    
  10

Java 1.4 did not have annotations as Ajay already said.

But before Java 5 and annotations there was something called XDoclet, which is a bit similar to annotations. So if you would absolutely like to use something like annotations in Java 1.4, then have a look at that.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
suneel kumar
Ranch Hand

Joined: Jan 08, 2007
Posts: 46
Thanks for your reply ,,
can you tell me how to write a small program in java by using annotations.. like .. Hello world programme.
class hello {
public static void main(String args[]) {
System.out.println("hello world ");
}
}
is above program is possible by using annotations ... in jdk1.5... please help me
Ajay Singh
Ranch Hand

Joined: Dec 13, 2006
Posts: 182
have a look to the site i have sent
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
I've put a simple example of how to use annotations at runtime up here. Run it, study it, make some changes to get a feel for how they work.


Ping & DNS - updated with new look and Ping home screen widget
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: help on annotations .
 
Similar Threads
Persistence unit xml or annotations in EJB3?
confused with JAP,Hibernate
@Id
Annotations
Issue in annotating DAO using spring 3.0