In the same package, I have two classes.
In class 1, I declare a
string variable and assign it some value.
After a few steps (i am using
struts as well and the second class is called a while later), the program execution comes to class 2 and here I need the value of the string from class 1.
I tried set and get methods in class 1 for the string and tried accessing that in class 2 (but declaring a new instance of class 1 and then calling the get method returns NULL for the string).
I cannot make the string variable static also because it is formed of some components.
Please help.