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

  • Home
  • SEARCH
  • 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 8061035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:11:44+00:00 2026-06-05T10:11:44+00:00

Possible Duplicate: What function do these Java annotations serve? How and where are Annotations

  • 0

Possible Duplicate:
What function do these Java annotations serve?
How and where are Annotations used in Java?

Well I’m trying to figure out, what annotations are, read plenty of docs, but still don’t understand what they do and how to use it…
Well I have this sample annotation description:

    @Documented
@interface ClassPreamble {
   String author();
   int currentRevision() default 1;
   String lastModified() default "N/A";
   String lastModifiedBy() default "N/A";
}

And then I’m trying to use it, but I don’t even know what to expect, lol:

   @ClassPreamble (author = "James")
public class PreAmbleReal {
    static public void main(String[] args) {




    }

    public String author();

}

So, can anyone explain this to me? Otherwise I’ll have wasted a few hours of time and learn nothing. :/

  • 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-06-05T10:11:46+00:00Added an answer on June 5, 2026 at 10:11 am

    Annotations don’t do anything by themselves. They are some attributes which are put on some other code structs (such as methods, classes, arguments,…). There must be some other processor to read the annotations and do something.

    Some annotations are just in source codes, and are not put in the compiled code, so tools which process the source code read them and process them, some annotations are put in compiled code but are not loaded by class loader, and some are put in compiled code and are loaded by class loader, so they can be read in runtime (these 3 behaviors are distinguished by @Retention annotation on the annotation itself).

    As far as I know in Java Language Specification, it is mentioned that lack of annotation classes on runtime shall not stop the application working, it means the class-loader just to ignore them. But may be the processor, or framework which use them make errors (which is what they should do).

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

Sidebar

Related Questions

Possible Duplicate: ROT-13 function in java? I have to shift all char from a
Possible Duplicate: How does dereferencing of a function pointer happen? Hi All, Why these
Possible Duplicate: Reading Datetime value From Excel sheet I'm trying to read in a
Possible Duplicate: php mail() function on localhost I'm trying to do some localhost testing
Possible Duplicate: What is the point of function pointers? I just read about pointers
Possible Duplicate: java - Array brackets after variable name When writing a Java function
Possible Duplicate: What's the nearest substitute for a function pointer in Java? Callback functions
Possible Duplicate: How to write a basic swap function in Java Hi. I don't
Possible Duplicate: Difference between (function(){})(); and function(){}(); I am trying to understand a few
Possible Duplicate: How to touch a file in C#? Is there a touch() function

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.