Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 709559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:30:59+00:00 2026-05-14T04:30:59+00:00

what is annotation class. what is the use of it in java/android. In iphone

  • 0

what is annotation class. what is the use of it in java/android.

In iphone Annotation is used to drop a pin on the map..

java has java.lang.Annotation package… what is the use of it? can i have a examples, tutorials,sample codes, etc?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:31:00+00:00Added an answer on May 14, 2026 at 4:31 am

    The two concepts are unrelated:

    • In the iPhone SDK, an annotation is a sort of note that you can put on a map.
    • In Java (and the Android SDK), annotations are a feature of the Java language used to add specific kinds of metadata to classes.

    In the Java world, annotations are compile-time tags which are attached to a piece of code. They add metadata to a snippet of code which tools or third parties (or even your own code) can then use later. But they usually don’t affect the way that code runs; that is, if you deleted the annotation, that snippet of code typically shouldn’t behave any differently.

    A simple example is marking a piece of code with a copyright notice. Here’s an annotation that we might use for this:

    public @interface Copyright {
        String value();
    }
    

    And here’s how we’d attach that metadata to code:

    @Copyright(value = "2010, United States National Security Administration")
    public class QuantumCryptographyDecoder { ... }
    

    If there’s only one annotation property named value you can omit the value = specifier as a shortcut:

    @Copyright("2010, United States National Security Administration")
    public class QuantumCryptographyDecoder { ... }
    

    Otherwise you have to specify it:

    @Created(year = 2010)
    public class ShinyNewClass { ... }
    

    If we removed the @Copyright annotation, the QuantumCryptographyDecoder would still work the same as it did before. There just wouldn’t be any Copyright metadata attached to it. But a third-party tool which did some kind of validation (for instance, requiring that all classes whose names included “Quantum” have a @Copyright notice attached) could alert you to the missing @Copyright or take some other useful action.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying use a Java annotation in a Groovy class but have trouble to
Use case: Wanna insert custom annotation to fields in java class generated by JAXB
below is a sample class: AAAA.java 1 package tp.domain; 2 3 import org.springframework.beans.factory.annotation.Value; 4
I have the following java class with the JAXB @XMLRootElement annotation @XmlRootElement(name=ClientData) public class
I Have a web service implementation class in java and I use wsgen to
earlier I use Spring MVC and annotation @ModelAttribute. @Controller public class ArticleController { @ModelAttribute(articles)
In my JPA class, I have this Annotation and the syntax I am not
I have a class Book which has some annotations like @Override , @Before ,
Possible Duplicate: When do you use Java's @Override annotation and why? Java, What does
When I use the annotation: @XmlRootElement(name=RootElement, namespace=namespace) class RootElement { to create xml file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.