title: changing the value of Mainactivity variable in another class
body: <p>I don't want to make a change in the copy, instead what I require is to make a change as a reference in the variable, so that the change should be reflected in the <code>mainactivity</code> class.</p>
  
  <p>In my app, I have a global variable "key"  declared as public static in the <code>mainactivity</code> class, I have made a button "Reset key", which make an Intent to the other activity.</p>
  
  <p>In that activity, I want to change the main activity's key value. what I m using is <code>String key1=MainActivity.key</code>
  , and after that, I m making a change in the key1 variable, but after changing the variable hen I return to the main activity, the key variable is still same.</p>
  
  <p>So, I want to make the change as a reference, not as a copy of the object or variable.</p>