Go back to 1Z0-895 - Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Exam

Question :-

A developer writes a stateful session bean FooBean with one remote business interface Foo. Foo defines an integer / setter method pair implemented as: 10. private int value; 11. public void setValue (int i) {value = i; } 12. public int getValue () {return value; } A session bean ClientBean has a business method doSomething and an ejb-ref with ejb-ref-name "fooRef" that is mapped to FooBean's Foo interface. 11. @Resource private SessionContext SessionCtx; 12. public void doSomething () { 13. Foo foo1 = (Foo) sessionCtx.lookup("fooRef"); 14. Foo foo2 = (Foo) sessionCtx.lookup("fooRef"); 15. foo1.setvalue(1); Which statement is true after the code at line 15 completes?
Foo1.getValue () = = 0 and foo2.getValue() = = 0
Foo1.getValue () = = 0 and foo2.getValue() = = 1
Foo1.getValue () = = 1 and foo2.getValue() = = 0
Foo1.getValue () = = 1 and foo2.getValue() = = 1

Want to practice for 1Z0-895 - Java Platform, Enterprise Edition 6 Enterprise JavaBeans Developer Certified Expert Exam ? Click here.