| Author |
Recieve value from another method
|
Pol Appan
Ranch Hand
Joined: Aug 26, 2004
Posts: 144
|
|
hello, I have a method like this I have another method How can I recieve value of first method loadUser in my second method? I do not want to add another parameter to prepareSession method because it is over riding. How can I achieve this? Thanks
|
Never take anything for granted because you never know when you will lose it
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32644
|
|
|
Would it work to make the currentUser variable a field instead?
|
 |
Pol Appan
Ranch Hand
Joined: Aug 26, 2004
Posts: 144
|
|
|
No didn't work
|
 |
satishkumar janakiraman
Ranch Hand
Joined: May 03, 2004
Posts: 334
|
|
Hi, I assume your methods are in the same class. Declare the currentUser as an instance variable. eg bye for now sat
|
 |
Pol Appan
Ranch Hand
Joined: Aug 26, 2004
Posts: 144
|
|
Ok. String bn = "myString"; I did like this In prepareSession I called as this.bn, bn is showing as myString. My question how to call bn is prepareSession method. I would lik to use bn in prepareSession method.
|
 |
satishkumar janakiraman
Ranch Hand
Joined: May 03, 2004
Posts: 334
|
|
In your method bye for now sat
|
 |
 |
|
|
subject: Recieve value from another method
|
|
|