25 questions for “Annotations”

Found in 1 field. Select a question to see its full answer.

Matching topics

Information Technology

25 questions in 4 technologies

#QuestionTechnologyTopicLevel
1What are annotations in Java, and what purpose do they serve? Java › AnnotationsJavaAnnotationsBeginner
2What do the built-in @Override, @Deprecated, and @SuppressWarnings annotations do? Java › AnnotationsJavaAnnotationsBeginner
3How do you apply multiple different annotations to the same element, and does their order matter? Java › AnnotationsJavaAnnotationsBeginner
4What are Java's meta-annotations (@Retention, @Target, @Documented, @Inherited), and what does each control? Java › AnnotationsJavaAnnotationsIntermediate
5How do annotations with elements (parameters) work, including default values and the special `value` element? Java › AnnotationsJavaAnnotationsIntermediate
6What is the difference between the @Nullable/@NonNull annotations (from libraries like JetBrains or JSR-305) and Java's built-in Optional type for expressing nullability? Java › AnnotationsJavaAnnotationsIntermediate
7How would you read custom annotations at runtime using reflection to implement annotation-driven behavior, such as a simple dependency injection or validation framework? Java › AnnotationsJavaAnnotationsAdvanced
8How do repeatable annotations work in Java (using @Repeatable), and what problem do they solve? Java › AnnotationsJavaAnnotationsAdvanced
9How do type annotations (introduced in Java 8, JSR 308) differ from traditional declaration annotations, and what new locations can they target? Java › AnnotationsJavaAnnotationsAdvanced
10How does a marker interface (an interface with no methods at all, like Serializable or Cloneable) work, and what's the modern alternative approach (annotations) for achieving similar 'tagging' purposes? Java › Interfaces & Abstract ClassesJavaInterfaces & Abstract ClassesAdvanced