Original Post
if you''ve programmed C++ i''m sure this will make perfect sense to you. I want to define something static, as it would have been in C++, where everytime you reenter a function/method, it will have the same value as when you left. I know i can define it so as to just be a member of the class, but i was planning on using a number of these, and that would make for rather messy code outside of the method. any suggestions?
what i mean is this (this should work in C, not totally sure, haven''t used it in a while)
void blah()
{
. static int I=5;
. i++;
}
everytime we come back into this function, I will be 6, 7, 8... 5 will only be assigned when the variable is declared.
Is there a way to do this with java?
-arsenius
''after three days without programming, life becomes meaningless'' -The Tao of Programming