Originally posted by YuenLian Wu:
Hi all,
I am very frustrated at static variable recently. I wrote the following program but the static variable can just added up once and then not anymore. For example, when the program just starts, the variable contains the value "AAAA0001", and the value will be added up each time when I call up this function, so that I will increase like "AAAA0002", "AAAA0003"..and so on.
Here is my code:
and I called it from other non-static function and the syntax is like "tran.setTranID(BookStoreUtility.getNextTranID());" during runtime, so it will execute this function many times before it terminated. I use an applet class to invoke the other function to call up this method, is that a big clue ? Since I am new to java, I hope I can get helps from you guys.
myriads thanks
Transistor
%
and I called it from other non-static function and the syntax is like "tran.setTranID(BookStoreUtility.getNextTranID());" during runtime, so it will execute this function many times before it terminated. I use an applet class to invoke the other function to call up this method, is that a big clue ? Since I am new to java, I hope I can get helps from you guys.
%
Originally posted by Michael Duffy:
And I wouldn't call this thread worthy of the "advanced" section.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Consider Paul's rocket mass heater. |