permaculture playing cards*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Instance Variable of Entity Class 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 "Instance Variable of Entity Class" Watch "Instance Variable of Entity Class" New topic
Author

Instance Variable of Entity Class

Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
Hi Folks,

JPA Spec says

"Instance variables must be private, protected, or package visibility"

Does that mean that instance variables should not be public?

Thanks
Cham
Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 547

yes it does.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
Thanks Celinio
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Instance Variable of Entity Class
 
Similar Threads
Youtube embed
Instance Variables & Class Variables
Multiple clients
loading the class and initialization of class
By convention - are there for exemple first variables, second getters and setters and third methods?