Which statement is correct?

Given:
11. @PersistenceContext EntityManager em;
12. public boolean test(Order o) {
13. boolean b = false;

14. o = em.merge(o); 15 em.remove(o);
16. o = em.merge(o);
17. b = em.contains(o);
18. return b;
19.}
Which statement is correct?

Given:
11. @PersistenceContext EntityManager em;
12. public boolean test(Order o) {
13. boolean b = false;

14. o = em.merge(o); 15 em.remove(o);
16. o = em.merge(o);
17. b = em.contains(o);
18. return b;
19.}
Which statement is correct?

A.
The method will return TRUE.

B.
Themethod will return FALSE.

C.
Themethodwill throw an exception.

D.
TheOrder instance willberemoved from the database.



Leave a Reply 0

Your email address will not be published. Required fields are marked *