Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity beans relationships question in the HFE

Adri Smith
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the HFE book, p432 q4:

Given the container-managed unidirectional relationship:

Foo(0-1) -> Bar(0-1)

and the object relations:


What will be true after the following code runs?


How is it possible that 'b2.getFoo()==null' is one of the correct answers ? If the relationship is unidirectionnal this means we can call the method getBar() on the Foo beans but not the method getFoo() on the Bar Beans.

I took a look at the errata, nothing has been specified about this.

Thanks in advance for your help,
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!