Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What does @Retention specify?
Think about when the annotation is available.
Which meta-annotation allows subclasses to inherit annotations?
Consider the nature of inheritance.
What does the @Target meta-annotation do?
Think about the usage context of annotations.
Is @Inherited applicable to all annotations?
Consider the scope of inheritance.
How would you implement a custom annotation that allows methods to be tracked for execution time and include retention and target meta-annotations?
Identify the purpose and where to use the annotation.
Create a scenario in which forgetting to annotate with @Documented could lead to issues in a large codebase.
Think about documentation and how it aids understanding in collaboration.
4 more questions in this section. Enroll free to practise them all.
Enroll free