Question: Fill in the blank with the correct value for @Target that allows the code to compile. A. ElementType.METHOD, ElementType.CONSTRUCTOR B. ElementType.ANNOTATION_TYPE C. ElementType.CONSTRUCTOR, ElementType.TYPE, ElementType.METHOD
Fill in the blank with the correct value for @Target that allows the code to compile.

A. ElementType.METHOD, ElementType.CONSTRUCTOR
B. ElementType.ANNOTATION_TYPE
C. ElementType.CONSTRUCTOR, ElementType.TYPE, ElementType.METHOD
D. ElementType.TYPE_USE
E. ElementType.LOCAL_VARIABLE, ElementType.FIELD
F. None of the above.
import java.lang.annotation.*; @Target ({_ _}) public @interface Light Source {} } Light Source class Bulb { @LightSource void light Switch() {} @LightSource private Bulb () {}
Step by Step Solution
3.39 Rating (152 Votes )
There are 3 Steps involved in it
C ElementTypeCONSTRUCTOR ElementTypeTYPE ElementTypeMETHOD The Target annot... View full answer
Get step-by-step solutions from verified subject matter experts
