What was annotation in java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What was annotation in java?

I’m slightly baffled when use it

9th Apr 2018, 1:15 AM
Bulb
Bulb - avatar
2 Answers
+ 3
an annotation is a form of syntactic metadata that can be added to Java source code. Classes, methods, variables, parameters and packages may be annotated. Like Javadoc tags, Java annotations can be read from source files. Unlike Javadoc tags, Java annotations can also be embedded in and read from class files generated by the compiler. This allows annotations to be retained by Java VM at run-time and read via reflection
9th Apr 2018, 1:24 AM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
0
Thanx :)
9th Apr 2018, 1:31 AM
Bulb
Bulb - avatar