Annotations
Usually comments added in the code will be removed during the compilation process. It will not reach till the runtime. It can also called as meta data(data about data). To overcome this we have one approach called XML which is not user friendly. So that's why we are going for Annotations. Annotations are case sensitive.
=> It is present inside the java.lang.annotation.Annotation and by default Annotation is the parent for all the annotations. We can use annotations every where inside code like methods, variables, parameters, constructors, interfaces etc..
=> Annotations means information about code.
=> Annotations are of 2 types.
i) Inbuilt ii) Custom
=>Annotations works based on the mechanism of interface.
Comments
Post a Comment