Oracle
1Z0-860 · Question #226
Given the following client-side code that makes use of the session bean Foo: 10. @EJB Foo beanl; 11. @EJB Foo bean2; //more code here 20. booleantestl = beanl.equals(beanl); 21. booleantest2 =…
The correct answer is B. If Foo is stateful, testlis true,and test2 is false. C. If Foo is stateless, testl is true, and test2 is true. See the full explanation below for the reasoning.
Question
Given the following client-side code that makes use of the session bean Foo: 10. @EJB Foo beanl; 11. @EJB Foo bean2; //more code here 20. booleantestl = beanl.equals(beanl); 21. booleantest2 = beanl.equals(bean2); Which two statements are true? (Choose two.)
Options
- AIf Foo is stateful,testl is true, and test2 is true.
- BIf Foo is stateful, testlis true,and test2 is false.
- CIf Foo is stateless, testl is true, and test2 is true.
- DIf Foo is stateful, testl is false, and test2 is false.
- EIf Foo is stateless, testl is true,and test2 is false.
- FIf Foo is stateless, testl is false, and test2 is false.
How the community answered
(18 responses)- A6% (1)
- B78% (14)
- D6% (1)
- E11% (2)
Community Discussion
No community discussion yet for this question.