title: Accessing same variable across multiple classes with same value
body: <p>I have two classes where I want to access the value of a unique variable.  In the first class I want to set the value of a 'isToogleflagon= true'.  In the second class I want to get the value of 'IsToogleflagon'.
  Here is where I set and get 'IsToogleFlagon'</p>
  
  <pre><code>public class Toogleflag{
      private String _isToogleflagon;
      public Toogleflag(){}
  
      public  Toogleflag(String  isToogleflagon) {
              this._isToogleflagon=isToogleflagon;
              }
  
      public String get_isToogleflagon(){
            return _isToogleflagon; 
              }
  
      public void set_isToogleflagon(String isToogleflagon) {
             this._isToogleflagon = isToogleflagon;
               }
  </code></pre>
  
  <p>I want to set the value of isToogleflagon="true" in my main class.  Below is part of my main class where I do this.</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
  Toogleflag toogleflag1 = new Toogleflag();
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
          ... 
          toogleflag1.set_isToogleflagon(GlobalVariables.TRUE);
           ...
  </code></pre>
  
  <p>Global.values(True)</p>
  
  <pre><code>public class GlobalVariables
  {
  public static String TRUE = "true";
  public static String FALSE = "false";
  }
  </code></pre>
  
  <p>Here's my second class where I want to get the value of isToogleflagon, in this case "true"</p>
  
  <pre><code> public class secondclass {
      Toogleflag toogleflag2 = new Toogleflag();
  
     public void test{
  
       String test=toogleflag2.get_isToogleflagon();
    }
  </code></pre>
  
  <p>When I run Class Secondclass the value of 'string test' does not get assigned a value. I want it to be assigned the value of "true".  Any advise on how to fix this is greatly appreciated.</p>
  
  <p>thanks,
  Jim</p>