Re: PRIVATE VARIABLES WITHIN PUBLIC CLASS
VERONICA ROACH <[email protected]> Mon, 6 Feb 2006 14:00:28 -0800
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <[email protected]> |
hello - thank you so much for your response - I now realise what I have to do with servlets. I had been using the following assumptions in a non-servlet environment - read somewhere - cant find which book to blame !! - if I invoke a new object with Objectname abc =3D new Objectname ; - suppose I have to create 6 of these - these objects would each own their own private variables - ie : I could reference abc.variablename and abc2.variablename etc ( unless the static keyword was used in which case java would maintain 1 variable in memory for the class variable ) Now based on your response - I still have to make sure I synchronize access to the private variables wherever multiples of the class may get invoked at the same time - that is abc.variablename=3Dabc2.variablename=3Dabc3.variablename if they get invoked at the same moment ? if so - I dont see how static class variables then are different from ordinary class level private variables ??? sorry to be a pain - I thought I had this nailed down but to my disgust my servlets stamped on each other (:>) thanks - vcragain __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _________________________________________________________________________= __ To unsubscribe, send email to [email protected] and include in the bo= dy of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html