W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
25 questions for “Annotations”
Found in 1 field. Select a question to see its full answer.
Matching topics
Java
Annotations
15
Information Technology
25 questions in 4 technologies
#
Question
Technology
Topic
Level
1
What are
annotations
in Java, and what purpose do they serve?
Java › Annotations
Java
Annotations
Beginner
2
What do the built-in @Override, @Deprecated, and @SuppressWarnings
annotations
do?
Java › Annotations
Java
Annotations
Beginner
3
How do you apply multiple different
annotations
to the same element, and does their order matter?
Java › Annotations
Java
Annotations
Beginner
4
What are Java's meta-
annotations
(@Retention, @Target, @Documented, @Inherited), and what does each control?
Java › Annotations
Java
Annotations
Intermediate
5
How do
annotations
with elements (parameters) work, including default values and the special `value` element?
Java › Annotations
Java
Annotations
Intermediate
6
What 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 › Annotations
Java
Annotations
Intermediate
7
How would you read custom
annotations
at runtime using reflection to implement annotation-driven behavior, such as a simple dependency injection or validation framework?
Java › Annotations
Java
Annotations
Advanced
8
How do repeatable
annotations
work in Java (using @Repeatable), and what problem do they solve?
Java › Annotations
Java
Annotations
Advanced
9
How do type
annotations
(introduced in Java 8, JSR 308) differ from traditional declaration
annotations
, and what new locations can they target?
Java › Annotations
Java
Annotations
Advanced
10
How 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 Classes
Java
Interfaces & Abstract Classes
Advanced
Show all 25 questions in Information Technology