Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFEJB mock question

 
Mannu hak
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peer...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic