nerdexam
Oracle

1Z0-899 · Question #180

Given the definition of Myobject and that an instance of Myobject is bound as a session attribute: 8. package com.example; 9. public class Myobject implements 10…

The correct answer is D. The valueUnbound method of the Myobject instance is called when the session to which it is bound. See the full explanation below for the reasoning.

Question

Given the definition of Myobject and that an instance of Myobject is bound as a session attribute: 8. package com.example; 9. public class Myobject implements 10. javax.servlet.http.HttpSessionBindingListener { 11. // class body code here 12. } Which is true?

Options

  • AOnly a single instance of Myobject may exist within a session
  • BThe unbound method of the Myobject instance is called when the session to which it is bound times out
  • CThe com.example.MyObject must be declared as a servlet event listener in the web application deployment
  • DThe valueUnbound method of the Myobject instance is called when the session to which it is bound

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    4% (1)
  • D
    83% (20)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice