Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-900 Topic 2 Question 61 Discussion

Actual exam question for Oracle's 1Z0-900 exam
Question #: 61
Topic #: 2
[All 1Z0-900 Questions]

Given the code sample:

And:

And:

And the next fragment from beans.xml:

And this injection point:

@Inject GenericMessenger messageHandler;

Which type would be injected at run time and referenced by the messageHandler variable?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Anastacia
2 months ago
Haha, this question is like a game of 'guess the bean'. I'm going to go with C and pray for the best. Ambiguous bean references are the bane of every Java developer's existence.
upvoted 0 times
Dyan
21 days ago
I agree, C seems like the most cautious choice given the circumstances.
upvoted 0 times
...
Asha
1 months ago
I'm leaning towards D, but I see your point about C being a potential issue.
upvoted 0 times
...
Shaunna
2 months ago
I think C is the safest bet here. Ambiguous bean references can be tricky.
upvoted 0 times
...
...
Tambra
2 months ago
I bet the answer is D. GenericMessenger. The injection point is using that interface, so it should just return the base interface implementation, right? *scratches head*
upvoted 0 times
...
Lucy
2 months ago
Definitely C. An exception would be thrown. How are we supposed to know which implementation to choose when there are multiple beans of the same type? This is a tricky one!
upvoted 0 times
Estrella
8 days ago
I think it's D) GenericMessenger.
upvoted 0 times
...
Beckie
16 days ago
SmsHandler would be injected at run time.
upvoted 0 times
...
Eladia
1 months ago
I agree, it's definitely C.
upvoted 0 times
...
Zana
2 months ago
None of the above. An exception would be thrown due to ambiguous bean references.
upvoted 0 times
...
Sarina
2 months ago
I think it's D) GenericMessenger.
upvoted 0 times
...
Mike
2 months ago
SmsHandler would be injected at run time.
upvoted 0 times
...
...
Truman
2 months ago
Hmm, you might be right. I guess it depends on how the beans are configured in the application context.
upvoted 0 times
...
Vannessa
2 months ago
I'm going with B. MsgHandler. The code samples show that MsgHandler implements GenericMessenger, and it's the only one that matches the injection point.
upvoted 0 times
...
Elza
2 months ago
Hmm, I think the answer is C. The beans.xml configuration seems to have multiple beans that implement the GenericMessenger interface, so there would be an ambiguous bean reference exception.
upvoted 0 times
Shawnta
23 days ago
MsgHandler would be referenced by the messageHandler variable.
upvoted 0 times
...
Elsa
23 days ago
I agree with you, it looks like an ambiguous bean reference exception.
upvoted 0 times
...
In
1 months ago
I believe it's D) GenericMessenger.
upvoted 0 times
...
Danica
2 months ago
SmsHandler would be injected at run time.
upvoted 0 times
...
...
Fatima
2 months ago
I disagree, I believe the answer is D) GenericMessenger because that's the type specified in the injection point.
upvoted 0 times
...
Truman
3 months ago
I think the answer is A) SmsHandler because it matches the type of the injected variable.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77