I have an Activity 'LoginPage' which contains pwd and email.
Once logged in, i am sending the 'email' value as a parameter at some random point to a class 'EmailDetails' in the following manner:-
obj.setEmail(email); //where obj is object of EmailDetails
'EmailDetails' contains the following code:-
public class EmailDetails
{
public String Usermail;
public void setEmail(String email)
{
Usermail = email; //Username='null' & email='XYZ@yahoo.co.in'
}
public String getEmail()
{
return Usermail; //Username='null'
}
}
When some other random activity 'X' wants to access 'email' value in the following manner:-
email=obj1.getEmail(); //where obj1 is Object of EmailDetails
The 'email' value return null.
So, where am i going wrong in the code? Thanks.