Exam 1z0-900 All QuestionsBrowse all questions from this exam
Question 12

Given the code fragment:

And -

Which two steps, when performed independently, enable the index.xhtml page to print the following text: The Id is 12345? (Choose two.)

    Correct Answer: C, E

    The correct options are to replace line 1 with '@Inject private Account acc;' (option C) and 'private @Inject Account acc;' (option E). This approach directly injects the Account instance into the Customer class, ensuring that when the getter method is called, the account information, including accId, will be available and correctly injected into the Customer object. This makes the accId accessible in the index.xhtml page.

Discussion
ciellaf5Options: AC

Answer A,C

orjavaOptions: CE

*not F, E is correct too. A,C and E works

orjavaOptions: AC

Answer A, C... not E. Tested on NetBeans

peteVlnOptions: CE

Answers are C, E, tested on NetBeans