declare the variable static.

> -----Original Message-----
> From: arun prakash [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 20, 2000 3:29 PM
> To: [EMAIL PROTECTED]
> Subject: Caching variable....
>
>
> Hi All.,
>          How can i cache the variables value in
> memeory in Java ??? For ex if i have a variable int i
> = 5; in a class which has a set method where its
> modified to 20...and a get method which just returns
> the value of i. Now first i will call the set method
> from another class.....now when i call the set method
> from a third program i want the value which was set by
> the second class but i'm getting it as 5...where as i
> want 20 if the set method is called.....before get.
>
> Thanx in advance.
> regards
> arun.
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Calendar - Get organized for the holidays!
> http://calendar.yahoo.com/
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to