title: Accessing a variable in another object of the same class
body: <p>I'm trying to access an array in the object "other," but I can't figure out how to access the variable. This is what I have so far:</p>
  
  <pre><code>public void union(DataSet other)
  {  
    DataSet temp = new newdataexp();
    temp = other; 
  }
  </code></pre>
  
  <p>I haven't been able to figure out how to access the variable, even when I create a method in the class that returns the variable and then trying to call it from this method union.</p>
  
  <p>I have this method, and am trying to do: String[][] temp = other.getdata(), but the compiler says that it cannot find symbol: method getdata().</p>
  
  <p>public String[][] getdata()
  {</p>
  
  <p>return filedata;</p>
  
  <p>}</p>