nerdexam
Oracle

1Z0-860 · Question #278

A developer writes a stateless session bean with a constructor, a PostConstruct method, a PreDestroy method, and this business method: 11. public String helloQj 12. return "hello"; 13.} The…

The correct answer is C. The PostConstruct method has been invoked. See the full explanation below for the reasoning.

Question

A developer writes a stateless session bean with a constructor, a PostConstruct method, a PreDestroy method, and this business method: 11. public String helloQj 12. return "hello"; 13.} The container invokes the hello method on an instance of the bean. Which is true about that bean instance when control reaches Line 12?

Options

  • AThe constructor has NOT been invoked.
  • BThe PreDestroy method has been invoked.
  • CThe PostConstruct method has been invoked.
  • DBoth the PostConstruct and PreDestroy methods have been invoked.

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    16% (6)
  • C
    73% (27)
  • D
    8% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice