D is correct, cause name is default value, is not required when use an anotaccion, and TYPE is FIELD not method.
C is incorrect cause name is mandatory if not has a default value
String name() is not mandatory for all instance variables, because it has a default value so C is not correct. type() is specified for all variables because has no default value.
ElementType.FIELD - applies to instance and static variables, and enum values. In this example _name, x and y are all instance variables, and all have type=..., so type() mandatory.
C is incorrect as name needs a default value.
D is correct because of the ElementType.FIELD being used correctly.
B is incorrect because ElementType.TYPE can only be used for: Class, interface (including annotation type), or enum declaration
C is correct
This definition includes the required elements name and type, with name having a default value of an empty string. The Type enum is also defined with the required values INT, STRING, and BOOLEAN. The annotation does not need to specify a target or retention policy to compile.
This section is not available anymore. Please use the main Exam Page.1z0-819 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ASPushkin
11 months, 1 week agod7bb0b2
1 year, 7 months agoRoxyFoxy
1 year, 8 months agoRoxyFoxy
1 year, 8 months agoOmnisumem
1 year, 10 months agoAshan_Ozlov
1 year, 9 months ago[Removed]
1 year, 10 months agoStavok
1 year, 12 months agotmuralimanohar
2 years agoNayoumi
2 years, 1 month agoAnkit1010
2 years, 5 months agoObalt
2 years, 5 months ago