Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the @ sign means in java? [duplicate]

Below is the code snippet.

@Intercepts({@Signature( type= Executor.class, method = "update", args = {MappedStatement.class,Object.class})}) public class 

Can someone explain to me what @ sign means in Java?

like image 862
henry Avatar asked Jun 04 '10 04:06

henry


People also ask

What does '?' Mean in Java?

It is called a 'NOT' operator. It can be used to convert false to true or vice versa. By using this operator, the logical state of an operand is reversed. In simple words, it inverts the value of a boolean. Read Also: What does \n and \t mean in Java.

What does a || b mean in Java?

It is a logical operator used in java.It is usually known as OR operator. for example ` if(a==1 || b==1) System. out. println("Something");

Does || mean or in Java?

|| operator in Java|| is a type of Logical Operator and is read as “OR OR” or “Logical OR“.

What does Carot mean in Java?

A place within a document view that represents where things can be inserted into the document model. A caret has a position in the document referred to as a dot. The dot is where the caret is currently located in the model.


2 Answers

It's an Annotation.

Annotations are a form of metadata. They provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate.

Annotations do affect the way programs are treated by tools and libraries, which can in turn affect the semantics of the running program. Annotations can be read from source files, class files, or reflectively at run time.

like image 188
Ryan Hayes Avatar answered Oct 04 '22 14:10

Ryan Hayes


Yeap. All the previous posters are correct, it's annotations and the links are correct.

For our C# buddies out there, I think it's akin to attributes.

like image 31
Ruaan Avatar answered Oct 04 '22 13:10

Ruaan