• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help on annotations .

 
suneel kumar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15205
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
suneel kumar
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have a look to the site i have sent
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic