Hi Folks,
I want to pass the String value between the classes both are same package. so i created the the classs like the code:
public class Map_Delegate {
String myLatitude;
String myLongitude;
String myName;
private String TAG = "Map_Delegate";
public String getMyName() {
return this.myName;
}
public void setMyName(String value) {
Log.v(TAG, value);
this.myName = value;
}
public String getMyLatitude() {
return this.myLatitude;
}
public void setMyLatitude(String value) {
Log.v(TAG, value);
this.myLatitude = value;
}
public String getMyLongitude() {
return this.myLongitude;
}
public void setMyLongitude(String value) {
Log.v(TAG, value);
this.myLongitude = value;
}
}
But it can't pass the value. I done like this code to set the value:
Map_Delegate map = new Map_Delegate();
map.setMyName(first_name_temp + " " + last_name_temp);
map.setMyLatitude(homeLatitude_temp);
map.setMyLongitude(homeLongitude_temp);
code to get the value:
Map_Delegate map = new Map_Delegate();
name_val = getMyName();
lat_val = getMyLatitude();
long_val = getMyLongitude();
Why get the Null value can you Guess? All classes in the same package and public .AnyIdea?