• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Mock question about field visibility of Entities

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic