Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

help on annotations .

 
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 ?
 
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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • 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
 
Rancher
Posts: 43011
76
  • 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.
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!