jQuery in Action, 2nd edition*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "help on annotations ." Watch "help on annotations ." New topic

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: 14074

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

Joined: Mar 22, 2005
Posts: 41095
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 - my free Android networking tools app
I agree. Here's the link: http://aspose.com/file-tools
subject: help on annotations .
Similar Threads
Issue in annotating DAO using spring 3.0
Persistence unit xml or annotations in EJB3?
confused with JAP,Hibernate