This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Mock question about field visibility of Entities Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Mock question about field visibility of Entities" Watch "Mock question about field visibility of Entities" New topic
Author

Mock question about field visibility of Entities

Benoît de Chateauvieux
Ranch Hand

Joined: Aug 10, 2007
Posts: 183
Hi All,

In the JavaBeat'site, there's a question about entities and I'm not sure of the answer:

6)Which of the following statements are correct?

a)Entities supports inheritance
b)Abstract class and concrete classes can be entities.
c)Intance variables of an entity class can be public
d)Instance variables of an entity class must be private,protected or package visibility

The answer is a, b and d.

I agree with a and b.
But I can't find anywhere in the spec any restriction about the visibility of the fields.
So, for me, c is OK and d is false...

Any idea ?

Thanks,

Beno�t


SCJP5 | SCBCD5 | SCEA5 Part 1
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Mock question about field visibility of Entities
 
Similar Threads
EJB Home And Select
Mock Exam about Entity Class
Mock question about field visibility of Entities
JavaBeat Question
EJB 3, Entity question