exam questions

Exam 1z0-819 All Questions

View all questions & answers for the 1z0-819 exam

Exam 1z0-819 topic 1 question 69 discussion

Actual exam question from Oracle's 1z0-819
Question #: 69
Topic #: 1
[All 1z0-819 Questions]

Given the declaration:

@inteface Resource {
String[] value();
}

Examine this code fragment:

/* Loc1 */ class ProcessOrders { ... }

Which two annotations may be applied at Loc1 in the code fragment? (Choose two.)

  • A. @Resource({“Customer1”, “Customer2”})
  • B. @Resource(value={{}})
  • C. @Resource
  • D. @Resource(“Customer1”)
  • E. @Resource()
Show Suggested Answer Hide Answer
Suggested Answer: AD 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
mendjijet
5 months, 4 weeks ago
Selected Answer: AD
Tested A D is ok
upvoted 1 times
...
d7bb0b2
6 months, 3 weeks ago
Selected Answer: AD
Are ok, value is requiered other opcion not pass this value
upvoted 1 times
...
Omnisumem
11 months ago
Selected Answer: AD
Tested: A and D.
upvoted 1 times
...
Stavok
1 year ago
Selected Answer: AE
The correct answers are A. @Resource({“Customer1”, “Customer2”}) and E. @Resource(). The @Resource annotation is defined to take an array of strings as its value. In option A, the annotation is applied with an array of two strings, which is a valid use of the annotation. In option E, the annotation is applied with an empty array, which is also a valid use of the annotation. Option D is incorrect because the value of the annotation must be an array of strings, not a single string.
upvoted 1 times
d7bb0b2
6 months, 4 weeks ago
E is incorrect=> must be pass a required value. D is valid => altougth pass a string "Customer1" for anotation that is valid not required {}.
upvoted 1 times
...
[Removed]
11 months, 1 week ago
D is correct. Actually any of these are correct. Last 2 only when 'value' is the only required element. @Resource(value={"String"}) @Resource(value="String") @Resource({"String"}) @Resource("String")
upvoted 1 times
...
...
Stavok
1 year, 1 month ago
Selected Answer: AD
A & D are correct
upvoted 1 times
...
Mukes877
1 year, 2 months ago
for empty @Resource({})
upvoted 2 times
...
xuancat
1 year, 2 months ago
Selected Answer: AD
A and D
upvoted 1 times
...
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago