Quick Answer
Annotations are metadata attached to code elements (classes, methods, fields). Built-in: @Override (verify you're overriding), @Deprecated (mark as obsolete), @SuppressWarnings. Create custom annotations with @interface. Frameworks use annotations heavily for configuration (Spring @Component, @Autowired; JPA @Entity, @Column). Annotations are processed at compile time (retention COMPILE) or runtime (retention RUNTIME via reflection).
Answer
Annotations provide metadata for code. Affect compilation or runtime behavior. Examples: @Override, @Deprecated, @SuppressWarnings.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.