This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
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?