Register / Login
EJB Certification (OCEEJBD)
About Epractice Lab's mock exam3 , question 19
posted 1 year ago
Question 19 of EPractice Lab mock exam 3:
@EJB MyBean a; @EJB MyBean2 b; Assume that MyBean and MyBean2 are singleton session beans with no interface. Which statements are true? a: b.equals(a) must return false; b: a.equals(b) must return false; c: b.equals(a) must return true; d. a.equals(b) must return true;
The model answer provided by EPractice Lab is option c and d.
But I think it
be a and b because MyBean and MyBean2 are referring to two different singleton beans with no-interface views.
Can a.equals(b) be true for a b which does not pass the instanceof test for the class of a?
equals and hashCode
about EPractice Lab mock 2 question 1, EJB Lite