Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Annotations in java

 
anish jain
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anybody please share the link explaining "Annotations" in java which can be easily understood?
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
 
anish jain
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maneesh Godbole wrote:http://www.google.com


If this is the case, then why www.coderanch.com exists ?
just kidding..

I have no idea abt Annotations..I want some link describing "Annotations" in layman's terms
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's mostly used for configuration purposes. Instead of using bold XML people now tend to use annotations.

Quick example



this is a mapping between the property name and the column in the SQL table. As you can see, much simpler than using an XML file.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For basic language questions like this, the Sun Java Tutorial should always be your first stop: http://java.sun.com/docs/books/tutorial/java/javaOO/annotations.html
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anish jain wrote:
Maneesh Godbole wrote:http://www.google.com


If this is the case, then why www.coderanch.com exists ?
just kidding..

Maneesh actually meant SearchFirst.

abt Annotations..

Please UseRealWords.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15274
38
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a look at Annotations in Sun's Java tutorials. It starts with examples that show how annotations can be useful.
 
Pushkar Choudhary
Rancher
Posts: 425
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anish jain wrote:
Maneesh Godbole wrote:http://www.google.com


If this is the case, then why www.coderanch.com exists ?
just kidding..


I believe Maneesh said that because you had asked the same question earlier and even at that time, you had been encouraged to Search First.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic