This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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: 2933
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...
It is sorta covered in the JavaRanch Style Guide.
subject: HFEJB mock question
It's not a secret anymore!