Hi,
I am trying to print a String value like this but still not able to get it,.
my method is like this:-
Class1 {
public String mystring;
public void mymethod(){
mystring = "";
}
//Then I am setting the value of mystring in other method like this:-
public void Method2(){
Class1 wow = new Class1();
wow.mymethod();
wow.mystring = somevalueInThisMethod;
}
}
Now I am trying to print the value of mystring in Class1 method like this;-
Class3{
public void method3(){
Class1 wow = new Class1();
wow.mymethod();
System.out.println(wow.mystring);
}
}
Its showing null and not printing any value...
Can somebody tell me how can I make it work ?
Thanks in advance
Web_Sailor