Question
Which statement about Reflection is the strongest interview answer?
- Reflection is mostly a naming style choice and has little effect on runtime or design.
- Reflection lets Java code inspect classes, methods, fields, and annotations at runtime.
- Reflection exists mainly to reduce the number of Java files in a project.
- Reflection matters only for frontend frameworks, not for core Java applications.
Hint
Start with the core rule behind Reflection.
Answer and rationale
Correct answer: B. Reflection lets Java code inspect classes, methods, fields, and annotations at runtime.
Reflection lets Java code inspect classes, methods, fields, and annotations at runtime. This is the base concept interviewers commonly test first.
Track: Java