my dog learned polymorphism*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes HFEJB mock question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "HFEJB mock question" Watch "HFEJB mock question" New topic

HFEJB mock question

Mannu hak
Ranch Hand

Joined: Apr 26, 2005
Posts: 50
Please look at the question 5 @ page 363 . The answer given is 'B', but i think it hould be 'B' and 'D'.

because in 'D' the return type is int and primary could be of type int.

Let me know what you think.


SCJP 1.4, SCWCD 1.4, SCBCD <br />IBM 285
Peer Reynders

Joined: Aug 19, 2005
Posts: 2906
EJB 2.0 specification

Page 197:
10.6.13 Entity bean�s primary key class
The class must provide suitable implementation of the hashCode() and equals(Object other) methods to simplify the management of the primary keys by the Container.

"int" can't do that; "Integer" could.
[ November 13, 2005: Message edited by: Peer Reynders ]

"Don't succumb to the false authority of a tool or model. There is no substitute for thinking."
Andy Hunt, Pragmatic Thinking & Learning: Refactor Your Wetware p.41
Mannu hak
Ranch Hand

Joined: Apr 26, 2005
Posts: 50
Thanks Peer...
I agree. Here's the link:
subject: HFEJB mock question
Similar Threads
p.363-mock exam q.5
HFEJB Page363 Question5 and Page428 Question12
overriding concept?
Doubt in Sun e-practice Sample question