Java SE 11 Developer (1Z0-819) — Question 148

Given this declaration:

@Target(TYPE)
@interface Resource {}

For which two kinds of declarations can the @Resource annotation be applied? (Choose two.)

Answer options

Correct answer: A, C

Explanation

The @Resource annotation, marked with @Target(TYPE), can be applied to type declarations such as classes and interfaces. Therefore, options A and C are correct, while options B, D, and E are incorrect as they do not represent type declarations.