Getter/Setter Problem in Java?
<p>I want to pass the String value between the classes both are same package. so i created the the classs like the code:</p>

<pre><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;
}
}
</code></pre>

<p>But it can't pass the value. I done like this code to set the value:</p>

<pre><code>Map_Delegate map = new Map_Delegate();
map.setMyName(first_name_temp + " " + last_name_temp);
map.setMyLatitude(homeLatitude_temp);
map.setMyLongitude(homeLongitude_temp);
</code></pre>

<p>code to get the value:</p>

<pre><code>   Map_Delegate map = new Map_Delegate();
   name_val = getMyName();
   lat_val = getMyLatitude();
   long_val = getMyLongitude();
</code></pre>

<p>Why get the Null value can you Guess? All classes in the same package and public .AnyIdea?</p>
