File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 2932
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 ]
Mannu hak
Ranch Hand

Joined: Apr 26, 2005
Posts: 50
Thanks Peer...
I agree. Here's the link:
subject: HFEJB mock question
It's not a secret anymore!