-2

I am watching a tutorial on Java and there is @ symbol. What does it mean? It looks so much like a comment /* */ or this one // Maybe it is a tag?

enter image description here

enter image description here

vytaute
  • 1,076
  • 2
  • 11
  • 27

2 Answers2

1

The @ symbol is a Java Annotation. What a Java annotation does, is that it adds a special attribute to the variable, method, class, interface, or other language elements.

Jacopo Mosconi
  • 667
  • 5
  • 19
  • 1
    I think because there is another question like this: https://stackoverflow.com/questions/31822020/in-java-what-does-the-symbol-mean?noredirect=1&lq=1 – Jacopo Mosconi Dec 18 '20 at 12:52
0

The "@" symbol is called an Annotation. You can take a look at these links here and they'll give you some good info in them:

https://docs.oracle.com/javase/tutorial/java/annotations/

http://tutorials.jenkov.com/java/annotations.html

Daniel
  • 404
  • 3
  • 19