| Author |
DataPool in servlet 4a
|
Peter Gragert
Ranch Hand
Joined: Jan 16, 2001
Posts: 421
|
|
Dear Marily I do not understand your 'remark': ======my code========== > static DataPool passwordInfo = new DataPool(); =========== Marilyns remark===== Why do you instantiate DataPool? What instance method are you using? ======= end =========== I just want to have a DataPool only once and it can be created already in the very first beginning such that I can use it without bothering about it in dependent classes (inheritance).
|
 |
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
|
|
DataPool has static methods. You don't need to instantiate it to use them. Integer.parseInt() is a static method of the Integer class. You don't need to instantiate an Integer to use the method. Integer theInt = new Integer() ; theInt.parseInt( args[0] ) ; is possible, but not necessary.
|
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
|
 |
Peter Gragert
Ranch Hand
Joined: Jan 16, 2001
Posts: 421
|
|
Thank you for immediate reply. I now know what you mean and where to look at. Have a nice weekend!
|
 |
 |
|
|
subject: DataPool in servlet 4a
|
|
|