Question 7 of 72 from exam 1Z0-900: Java EE 7 Application Developer

Question 7 of 72 from exam 1Z0-900: Java EE 7 Application Developer

Question

Given the code fragment:

1: @ReguestScoped
2: public class BankActivityService {
3:

public void notifyDebit(BankEvent be) {}

4:
5:
6
7: public void notifyCredit(BankEvent be) {}
8:
o

a)

Which code can be added to register both of these methods to receive BankEvent notifications only if an instance of BankActivityService is already instantiated in the current context?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

A.

Reference - https://docs.oracle.com/javaee/7/tutorial/cdi-adv005.html.