Register / Login
Win a copy of
Java 9 Revealed
this week in the
Features new in Java 9
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
EJB Certification (OCEEJBD)
About Epractice Lab's mock exam3 , question 19
posted 2 years 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.
Boost this thread!
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