Oracle
1Z0-895 · Question #23
1Z0-895 Question #23: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-895 to reveal the answer and full explanation for question #23. The question stem and answer options stay visible for context.
Question
A developer writes a stateless session bean FooBean with one remote business interface FooRemote containing one business method foo. Method foo takes a single parameter of application-defined type MyData. 11. public class MyData implements java.io.Serialization { 12. int a; 13. } Methods foo is implemented with the FooBean class as: 11. public void foo (MyData data) { 12. data.a = 2; 13. } Another session bean within the same application has a reference to FooRemote in variable fooRef and calls method foo with the following code: 11. MyData data = new MyData(); 12. data.a = 1; 13. Fooref.foo(data); 14. System.out.printIn(data.a); What is the value of data.a when control reaches Line 14 of the client?
Options
- A0
- B1
- C2
Unlock 1Z0-895 to see the answer
You've previewed enough free 1Z0-895 questions. Unlock 1Z0-895 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.