dcsimg
static variables inside functions
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   dachih_naraw
Posted On:   Thursday, April 4, 2002 11:25 AM


Hi all,

I don't know how to do in Java "static" variables inside functions(methods) like in C++.

I want to retain a value between function calls and I don't want (I can't) use global variable(object member data).

			
private void myfunction(){
int ione = 10;
//How initialize "ione" only once ???
//static int ione = 10 <--- error
...
...
}

Please help me on this.
Thanks.

Re: static variables inside functions

Posted By:   Bozidar_Dangubic  
Posted On:   Friday, April 5, 2002 05:31 AM

can't do it.
About | Sitemap | Contact